You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
agonbina
changed the title
Resetting locals to undefined triggers a setter which tries to access attributes in the empty (undefined)record argument
Resetting locals to undefined triggers a setter with an (undefined)record argument
Jun 17, 2016
... the setter then tries to access attributes in the passed in record which ends up in throwing an exception.
https://github.com/js-data/js-data/blob/master/src/DataStore.js#L442, which triggers a setter(this block: https://github.com/js-data/js-data/blob/master/src/DataStore.js#L598-L630) with an undefined value, so this line here throws: https://github.com/js-data/js-data/blob/master/src/DataStore.js#L604 because record is undefined ...
Replacing
utils.set
(https://github.com/js-data/js-data/blob/master/src/DataStore.js#L442) withsafeSet
fixes the issue.The text was updated successfully, but these errors were encountered: