Skip to content

Commit 7bd287e

Browse files
committed
_handleSaveResponse: Merge response value with original attributes for nested objects
1 parent b2dab6f commit 7bd287e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/ParseObject.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,7 @@ class ParseObject {
408408
changes[attr] = new ParseACL(response[attr]);
409409
} else if (attr !== 'objectId') {
410410
const val = decode(response[attr]);
411-
if (val && typeof val === 'object'
412-
&& !(val instanceof Array)
413-
&& !(val instanceof ParseObject)
414-
&& !(val instanceof ParseFile)
415-
&& !(val instanceof ParseRelation)
416-
&& !(val instanceof Op)
417-
&& !(Object.prototype.toString.call(val) === '[object Date]')) {
418-
411+
if (val && Object.getPrototypeOf(val) === Object.prototype) {
419412
// Update the object by merging in updates w/ old object
420413
changes[attr] = { ...this.attributes[attr], ...val }
421414
} else {

0 commit comments

Comments
 (0)