Merge pull request #1114 from ParsePlatform/flovilmart.addUniqueObject

Adds support for plain object in $add, $addUnique, $remove
This commit is contained in:
Florent Vilmart
2016-03-21 08:21:30 -04:00
2 changed files with 51 additions and 5 deletions

View File

@@ -398,6 +398,9 @@ function transformAtom(atom, force, options) {
if (FileCoder.isValidJSON(atom)) {
return (inArray || inObject ? atom : FileCoder.JSONToDatabase(atom));
}
if (inArray || inObject) {
return atom;
}
if (force) {
throw new Parse.Error(Parse.Error.INVALID_JSON,