mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses (#6021)
This commit is contained in:
@@ -37,12 +37,10 @@ export default Vue.extend({
|
||||
if (this.autofocus && this.$refs.input) {
|
||||
this.focus();
|
||||
}
|
||||
|
||||
if (this.eventBus) {
|
||||
this.eventBus.on('focus', () => {
|
||||
this.focus();
|
||||
});
|
||||
}
|
||||
this.eventBus?.on('focus', this.focus);
|
||||
},
|
||||
destroyed() {
|
||||
this.eventBus?.off('focus', this.focus);
|
||||
},
|
||||
methods: {
|
||||
focus() {
|
||||
|
||||
Reference in New Issue
Block a user