-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree: Implicitly constructed object nodes now only consider own prope…
…rties during validation (#22453) ## Description See changeset for details.
- Loading branch information
1 parent
f59f03d
commit 27faa56
Showing
5 changed files
with
179 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
"@fluidframework/tree": minor | ||
"fluid-framework": minor | ||
--- | ||
--- | ||
"section": "tree" | ||
--- | ||
Implicitly constructed object nodes now only consider own properties during validation. | ||
|
||
When determining if some given data is compatible with a particular ObjectNode schema, both inherited and own properties used to be considered. | ||
However when actually constructing the node from the data, only own properties were used. | ||
This could lead to input containing inherited properties getting validated, but producing out of schema nodes missing fields. | ||
This has been fixed and now both code paths use the same check, for own properties, when evaluating if an input has a property that should be considered for providing the content of the node's field. | ||
|
||
This may cause some cases which previously exhibited data corruption to now throw a usage error reporting the data is incompatible. | ||
Such cases may need to copy data from the objects with inherited properties into new objects with own properties before constructing nodes from them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters