mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses (#6021)
This commit is contained in:
@@ -53,12 +53,7 @@ export default Vue.extend({
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('keydown', this.onWindowKeydown);
|
||||
|
||||
if (this.eventBus) {
|
||||
this.eventBus.on('close', () => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
this.eventBus?.on('close', this.close);
|
||||
|
||||
const activeElement = document.activeElement as HTMLElement;
|
||||
if (activeElement) {
|
||||
@@ -66,6 +61,7 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.eventBus?.off('close', this.close);
|
||||
window.removeEventListener('keydown', this.onWindowKeydown);
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user