File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ module.exports = function(AV) {
188188 * @return {AV.File } the file object
189189 */
190190 AV . File . createWithoutData = function ( objectId ) {
191+ if ( ! objectId ) {
192+ throw new TypeError ( 'The objectId must be provided' ) ;
193+ }
191194 var file = new AV . File ( ) ;
192195 file . id = objectId ;
193196 return file ;
Original file line number Diff line number Diff line change @@ -1381,6 +1381,9 @@ module.exports = function(AV) {
13811381 } else {
13821382 throw new Error ( 'class must be a string or a subclass of AV.Object.' ) ;
13831383 }
1384+ if ( ! id ) {
1385+ throw new TypeError ( 'The objectId must be provided' ) ;
1386+ }
13841387 const object = new _klass ( ) ;
13851388 object . id = id ;
13861389 object . _hasData = hasData ;
You can’t perform that action at this time.
0 commit comments