fix: unlisten to annotation event beforeDestroy (#6690)

* fix: unlisten to annotation event beforeDestroy

* refactor: `npm run lint:fix`

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
This commit is contained in:
Jesse Mazzella 2023-05-24 02:29:19 -07:00 committed by GitHub
parent 356c90ca45
commit fea68381a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,7 @@ export default {
await this.updateSelection(this.openmct.selection.get());
},
beforeDestroy() {
this.openmct.annotation.off('targetDomainObjectAnnotated', this.loadAnnotationForTargetObject);
this.openmct.selection.off('change', this.updateSelection);
const unobserveEntryFunctions = Object.values(this.unobserveEntries);
unobserveEntryFunctions.forEach((unobserveEntry) => {