File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1215,23 +1215,23 @@ export default class SchemaController {
1215
1215
const promises = [ ] ;
1216
1216
1217
1217
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' ) {
1223
1219
geocount ++ ;
1224
1220
}
1225
1221
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.
1228
1222
return Promise . reject (
1229
1223
new Parse . Error (
1230
1224
Parse . Error . INCORRECT_TYPE ,
1231
1225
'there can only be one geopoint field in a class'
1232
1226
)
1233
1227
) ;
1234
1228
}
1229
+ }
1230
+ for ( const fieldName in object ) {
1231
+ if ( object [ fieldName ] === undefined ) {
1232
+ continue ;
1233
+ }
1234
+ const expected = getType ( object [ fieldName ] ) ;
1235
1235
if ( ! expected ) {
1236
1236
continue ;
1237
1237
}
You can’t perform that action at this time.
0 commit comments