@@ -303,7 +303,7 @@ class Browser extends DashboardView {
303
303
this . currentQuery . cancel ( ) ;
304
304
}
305
305
if ( this . currentInfoPanelQuery ) {
306
- this . currentInfoPanelQuery . abort ( ) ;
306
+ this . currentInfoPanelQuery . cancel ?. ( ) ;
307
307
this . currentInfoPanelQuery = null ;
308
308
}
309
309
this . removeLocation ( ) ;
@@ -354,7 +354,7 @@ class Browser extends DashboardView {
354
354
355
355
fetchAggregationPanelData ( objectId , className , appId ) {
356
356
if ( this . currentInfoPanelQuery ) {
357
- this . currentInfoPanelQuery . abort ( ) ;
357
+ this . currentInfoPanelQuery . cancel ?. ( ) ;
358
358
this . currentInfoPanelQuery = null ;
359
359
}
360
360
@@ -377,13 +377,11 @@ class Browser extends DashboardView {
377
377
this . state . classwiseCloudFunctions [ `${ appId } ${ appName } ` ] ?. [ className ] [ 0 ] . cloudCodeFunction ;
378
378
379
379
const promise = Parse . Cloud . run ( cloudCodeFunction , params , options ) ;
380
- this . currentInfoPanelQuery = {
381
- abort : ( ) => requestTask ?. abort ( ) ,
382
- promise,
383
- } ;
380
+ promise . cancel = ( ) => requestTask ?. abort ( ) ;
381
+ this . currentInfoPanelQuery = promise ;
384
382
promise . then (
385
383
result => {
386
- if ( this . currentInfoPanelQuery ?. promise !== promise ) {
384
+ if ( this . currentInfoPanelQuery !== promise ) {
387
385
return ;
388
386
}
389
387
if ( result && result . panel && result . panel && result . panel . segments ) {
@@ -397,7 +395,7 @@ class Browser extends DashboardView {
397
395
}
398
396
} ,
399
397
error => {
400
- if ( this . currentInfoPanelQuery ?. promise !== promise ) {
398
+ if ( this . currentInfoPanelQuery !== promise ) {
401
399
return ;
402
400
}
403
401
this . setState ( {
@@ -407,7 +405,7 @@ class Browser extends DashboardView {
407
405
this . showNote ( this . state . errorAggregatedData , true ) ;
408
406
}
409
407
) . finally ( ( ) => {
410
- if ( this . currentInfoPanelQuery ?. promise === promise ) {
408
+ if ( this . currentInfoPanelQuery === promise ) {
411
409
this . currentInfoPanelQuery = null ;
412
410
}
413
411
} ) ;
0 commit comments