url can & should be constructed during read

This commit is contained in:
Jim Lin
2016-02-27 16:05:55 +08:00
parent ae9f196ec7
commit 88b14a914a
2 changed files with 1 additions and 1 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -743,7 +743,7 @@ function getObjectType(obj) {
case 'File' :
if(obj.url && obj.name) {
return 'file';
} else {
} else if(!obj.url){
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);
}