Skip to content

Commit b6694d6

Browse files
committed
fix geopoint deadlock
1 parent 869ce52 commit b6694d6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Controllers/SchemaController.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,23 +1215,23 @@ export default class SchemaController {
12151215
const promises = [];
12161216

12171217
for (const fieldName in object) {
1218-
if (object[fieldName] === undefined) {
1219-
continue;
1220-
}
1221-
const expected = getType(object[fieldName]);
1222-
if (expected === 'GeoPoint') {
1218+
if (object[fieldName] && getType(object[fieldName]) === 'GeoPoint') {
12231219
geocount++;
12241220
}
12251221
if (geocount > 1) {
1226-
// Make sure all field validation operations run before we return.
1227-
// If not - we are continuing to run logic, but already provided response from the server.
12281222
return Promise.reject(
12291223
new Parse.Error(
12301224
Parse.Error.INCORRECT_TYPE,
12311225
'there can only be one geopoint field in a class'
12321226
)
12331227
);
12341228
}
1229+
}
1230+
for (const fieldName in object) {
1231+
if (object[fieldName] === undefined) {
1232+
continue;
1233+
}
1234+
const expected = getType(object[fieldName]);
12351235
if (!expected) {
12361236
continue;
12371237
}

0 commit comments

Comments
 (0)