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
If I have a record in cache with valid properites, and later on if its gets 'merged with another version of this record that has some of the properties 'undefined, valid properties present in cache earlier gets over-written with 'undefined' values in deepMixIn() function.
Here is current implementation of this function:
deepMixIn: function deepMixIn(dest, source) {
if (source) {
for (var key in source) {
var value = source[key];
var existing = dest[key];
if (isPlainObject(value) && isPlainObject(existing)) {
utils.deepMixIn(existing, value);
} else {
dest[key] = value;
}
}
}
return dest;
},
And we can fix it by changing it like:
deepMixIn: function deepMixIn(dest, source) {
if (source) {
for (var key in source) {
var value = source[key];
var existing = dest[key];
if (isPlainObject(value) && isPlainObject(existing)) {
utils.deepMixIn(existing, value);
} else if (typeof value !== 'undefined') {
dest[key] = value;
}
}
}
return dest;
},
Description
If I have a record in cache with valid properites, and later on if its gets 'merged
with another version of this record that has some of the properties 'undefined
, valid properties present in cache earlier gets over-written with 'undefined' values indeepMixIn()
function.Here is current implementation of this function:
And we can fix it by changing it like:
Environment
"js-data": "^3.0.5",
"js-data-http": "^3.0.1",
Thanks!
The text was updated successfully, but these errors were encountered: