Call devFreeze on initialData (#2332)
I noticed we weren't freezing the initialData passed into the store. ### Change Type - [x] `patch` — Bug fix
This commit is contained in:
parent
ed153a4180
commit
509ee3a6e4
1 changed files with 4 additions and 1 deletions
|
@ -187,7 +187,10 @@ export class Store<R extends UnknownRecord = UnknownRecord, Props = unknown> {
|
|||
objectMapFromEntries(
|
||||
objectMapEntries(initialData).map(([id, record]) => [
|
||||
id,
|
||||
atom('atom:' + id, this.schema.validateRecord(this, record, 'initialize', null)),
|
||||
atom(
|
||||
'atom:' + id,
|
||||
devFreeze(this.schema.validateRecord(this, record, 'initialize', null))
|
||||
),
|
||||
])
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue