@@ -303,7 +303,7 @@ class Browser extends DashboardView {
303303 this . currentQuery . cancel ( ) ;
304304 }
305305 if ( this . currentInfoPanelQuery ) {
306- this . currentInfoPanelQuery . abort ( ) ;
306+ this . currentInfoPanelQuery . cancel ?. ( ) ;
307307 this . currentInfoPanelQuery = null ;
308308 }
309309 this . removeLocation ( ) ;
@@ -354,7 +354,7 @@ class Browser extends DashboardView {
354354
355355 fetchAggregationPanelData ( objectId , className , appId ) {
356356 if ( this . currentInfoPanelQuery ) {
357- this . currentInfoPanelQuery . abort ( ) ;
357+ this . currentInfoPanelQuery . cancel ?. ( ) ;
358358 this . currentInfoPanelQuery = null ;
359359 }
360360
@@ -377,13 +377,11 @@ class Browser extends DashboardView {
377377 this . state . classwiseCloudFunctions [ `${ appId } ${ appName } ` ] ?. [ className ] [ 0 ] . cloudCodeFunction ;
378378
379379 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 ;
384382 promise . then (
385383 result => {
386- if ( this . currentInfoPanelQuery ?. promise !== promise ) {
384+ if ( this . currentInfoPanelQuery !== promise ) {
387385 return ;
388386 }
389387 if ( result && result . panel && result . panel && result . panel . segments ) {
@@ -397,7 +395,7 @@ class Browser extends DashboardView {
397395 }
398396 } ,
399397 error => {
400- if ( this . currentInfoPanelQuery ?. promise !== promise ) {
398+ if ( this . currentInfoPanelQuery !== promise ) {
401399 return ;
402400 }
403401 this . setState ( {
@@ -407,7 +405,7 @@ class Browser extends DashboardView {
407405 this . showNote ( this . state . errorAggregatedData , true ) ;
408406 }
409407 ) . finally ( ( ) => {
410- if ( this . currentInfoPanelQuery ?. promise === promise ) {
408+ if ( this . currentInfoPanelQuery === promise ) {
411409 this . currentInfoPanelQuery = null ;
412410 }
413411 } ) ;
0 commit comments