@@ -161,8 +161,10 @@ module.exports = function(AV) {
161161 var query = new AV . Query ( response . className ) ;
162162 var results = _ . map ( response . results , function ( json ) {
163163 var obj = query . _newObject ( response ) ;
164- obj . _finishFetch ( query . _processResult ( json ) , true ) ;
165- return obj ;
164+ if ( obj . _finishFetch ) {
165+ obj . _finishFetch ( query . _processResult ( json ) , true ) ;
166+ }
167+ return obj ;
166168 } ) ;
167169 return {
168170 results : results ,
@@ -273,7 +275,9 @@ module.exports = function(AV) {
273275 return request . then ( function ( response ) {
274276 return _ . map ( response . results , function ( json ) {
275277 var obj = self . _newObject ( response ) ;
276- obj . _finishFetch ( self . _processResult ( json ) , true ) ;
278+ if ( obj . _finishFetch ) {
279+ obj . _finishFetch ( self . _processResult ( json ) , true ) ;
280+ }
277281 return obj ;
278282 } ) ;
279283 } ) . _thenRunCallbacks ( options ) ;
@@ -333,7 +337,9 @@ module.exports = function(AV) {
333337 return request . then ( function ( response ) {
334338 return _ . map ( response . results , function ( json ) {
335339 var obj = self . _newObject ( ) ;
336- obj . _finishFetch ( self . _processResult ( json ) , true ) ;
340+ if ( obj . _finishFetch ) {
341+ obj . _finishFetch ( self . _processResult ( json ) , true ) ;
342+ }
337343 return obj ;
338344 } ) [ 0 ] ;
339345 } ) . _thenRunCallbacks ( options ) ;
0 commit comments