Skip to content

Commit

Permalink
fix: Duplicate pending operations on nested fields (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis authored Jun 7, 2024
1 parent 210f8d6 commit df6df7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ParseObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ class ParseObject {
json[attr] = encode(attrs[attr], false, false, seen, offline);
}
}

const pending = this._getPendingOps();
for (const attr in pending[0]) {
if (attr.indexOf('.') < 0) {
json[attr] = pending[0][attr].toJSON(offline);
}
}
if (this.id) {
json.objectId = this.id;
}
Expand Down

0 comments on commit df6df7c

Please sign in to comment.