Added remark about handling class instances ...
when validating `value` in `transactionApi.set(pointer, value)` where `pointer` points to a compound prop. https://github.com/theatre-js/theatre/pull/118#discussion_r846629352
This commit is contained in:
parent
64874d644b
commit
2c7591b589
1 changed files with 4 additions and 0 deletions
|
@ -113,6 +113,10 @@ export const compound = <Props extends IShorthandCompoundProps>(
|
||||||
return deserializationCache.get(json)
|
return deserializationCache.get(json)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO we should probably also check here whether `json` is a pure object rather
|
||||||
|
// than an instance of a class, just to avoid the possible edge cases of handling
|
||||||
|
// class instances.
|
||||||
|
|
||||||
const deserialized: $FixMe = {}
|
const deserialized: $FixMe = {}
|
||||||
let atLeastOnePropWasDeserialized = false
|
let atLeastOnePropWasDeserialized = false
|
||||||
for (const [key, propConfig] of Object.entries(sanitizedProps)) {
|
for (const [key, propConfig] of Object.entries(sanitizedProps)) {
|
||||||
|
|
Loading…
Reference in a new issue