Check null
See https://github.com/strongloop/loopback-datasource-juggler/issues/223
This commit is contained in:
parent
e23c2f2763
commit
7f9108c6d2
|
@ -1155,6 +1155,7 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, cb
|
|||
inst[key] = data[key];
|
||||
typedData[key] = inst[key];
|
||||
if (typeof typedData[key] === 'object'
|
||||
&& typedData[key] !== null
|
||||
&& typeof typedData[key].toObject === 'function') {
|
||||
typedData[key] = typedData[key].toObject();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue