[Staleness] Fix removed object error and clean up (#6241)

* fixing error from plots when removing swg and making methods and props private for swg staleness provider

* removing unsubscribes from destroy hooks if the item has been removed already and reverting an unneccesary change

* checking for undefined staleness response

* removed un-neccesary code
This commit is contained in:
Jamie V
2023-02-01 14:06:54 -08:00
committed by GitHub
parent c1c1d87953
commit c1e8c7915c
6 changed files with 72 additions and 55 deletions

View File

@@ -218,6 +218,7 @@ export default {
this.stalenessSubscription[keystring].unsubscribe();
this.stalenessSubscription[keystring].stalenessUtils.destroy();
this.handleStaleness(keystring, { isStale: false }, SKIP_CHECK);
delete this.stalenessSubscription[keystring];
};
},
handleStaleness(id, stalenessResponse, skipCheck = false) {