Skip to content

Commit eb1cfcf

Browse files
authored
Fix atom is undefined (#2663)
1 parent fe62e92 commit eb1cfcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Adapters/Storage/Mongo/MongoTransform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ function transformConstraint(constraint, inArray) {
491491
case '$eq':
492492
answer[key] = inArray ? transformInteriorAtom(constraint[key]) : transformTopLevelAtom(constraint[key]);
493493
if (answer[key] === CannotTransform) {
494-
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${atom}`);
494+
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${constraint[key]}`);
495495
}
496496
break;
497497

@@ -504,7 +504,7 @@ function transformConstraint(constraint, inArray) {
504504
answer[key] = arr.map(value => {
505505
let result = inArray ? transformInteriorAtom(value) : transformTopLevelAtom(value);
506506
if (result === CannotTransform) {
507-
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${atom}`);
507+
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${value}`);
508508
}
509509
return result;
510510
});

0 commit comments

Comments
 (0)