Fix atom is undefined (#2663)

This commit is contained in:
Florent Vilmart
2016-09-08 21:19:39 -04:00
committed by GitHub
parent fe62e92aa1
commit eb1cfcf351

View File

@@ -491,7 +491,7 @@ function transformConstraint(constraint, inArray) {
case '$eq':
answer[key] = inArray ? transformInteriorAtom(constraint[key]) : transformTopLevelAtom(constraint[key]);
if (answer[key] === CannotTransform) {
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${atom}`);
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${constraint[key]}`);
}
break;
@@ -504,7 +504,7 @@ function transformConstraint(constraint, inArray) {
answer[key] = arr.map(value => {
let result = inArray ? transformInteriorAtom(value) : transformTopLevelAtom(value);
if (result === CannotTransform) {
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${atom}`);
throw new Parse.Error(Parse.Error.INVALID_JSON, `bad atom: ${value}`);
}
return result;
});