Observing a data model like foo: { "bar.baz": { quuz: 1 } } with an observer like foo.*.quuz doesn't get observed if the last part is an object, or gets called with an old value if the last part is an array (quuz: [1]).
The underlying cause could be an unescaped key in ModelBase.js line 85. I've submitted the pull request #3320 for a possible fix.
Your assessment appears to be spot on. I've merged your PR, and will release updates to the 1.2 and 1.3 branches sometime in the next day or so. Thanks!
Description:
Observing a data model like
foo: { "bar.baz": { quuz: 1 } }
with an observer likefoo.*.quuz
doesn't get observed if the last part is an object, or gets called with an old value if the last part is an array (quuz: [1]
).The underlying cause could be an unescaped key in ModelBase.js line 85. I've submitted the pull request #3320 for a possible fix.
Versions affected:
1.3.8, edge
Platforms affected:
Tested on Firefox and Safari (both on macOS)
Reproduction:
https://jsfiddle.net/pwq710hy/1/ (my possible fix is included as an alternative script)