Fix bug to __type checking
This commit is contained in:
@@ -741,9 +741,9 @@ function getObjectType(obj) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'File' :
|
case 'File' :
|
||||||
if(obj.url && obj.name) {
|
if(obj.name) {
|
||||||
return 'file';
|
return 'file';
|
||||||
} else if(!obj.url){
|
} else {
|
||||||
let msg = obj.name? JSON.stringify(obj) + " is not a valid File" : "File has no name";
|
let msg = obj.name? JSON.stringify(obj) + " is not a valid File" : "File has no name";
|
||||||
throw new Parse.Error(Parse.Error.INCORRECT_TYPE, msg);
|
throw new Parse.Error(Parse.Error.INCORRECT_TYPE, msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user