Skip to content

Commit

Permalink
🐛 Fix increment array nested object field
Browse files Browse the repository at this point in the history
Fixes parse-community/parse-server#6687 by
modifying the estimateAttribute function logic in src/ObjectStateMutations.js.
  • Loading branch information
KaustubhDamania committed Apr 13, 2021
1 parent 4a75d97 commit 5bbdeff
Show file tree
Hide file tree
Showing 4 changed files with 805 additions and 1,053 deletions.
7 changes: 2 additions & 5 deletions integration/test/ParseObjectTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,7 @@ describe('Parse Object', () => {
});

obj.increment('objectField.number', 15);
assert.deepStrictEqual(obj.attributes.objectField, {
number: 20,
letter: 'a',
});
await obj.save();
assert.deepStrictEqual(obj.attributes.objectField, {
number: 20,
letter: 'a',
Expand Down Expand Up @@ -381,7 +378,7 @@ describe('Parse Object', () => {
} catch (error) {
assert.equal(
error.message,
'schema mismatch for TestObject.hello; expected String but got Object'
`Cannot create property 'dot' on string 'world'`
);
}
});
Expand Down
Loading

0 comments on commit 5bbdeff

Please sign in to comment.