mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses (#6021)
This commit is contained in:
@@ -92,15 +92,10 @@ export default mixins(showMessage).extend({
|
||||
deepCopy(defaultMessageEventBusDestinationOptions),
|
||||
this.destination,
|
||||
);
|
||||
this.eventBus.on('destinationWasSaved', () => {
|
||||
const updatedDestination = this.logStreamingStore.getDestination(this.destination.id);
|
||||
if (updatedDestination) {
|
||||
this.nodeParameters = Object.assign(
|
||||
deepCopy(defaultMessageEventBusDestinationOptions),
|
||||
this.destination,
|
||||
);
|
||||
}
|
||||
});
|
||||
this.eventBus?.on('destinationWasSaved', this.onDestinationWasSaved);
|
||||
},
|
||||
destroyed() {
|
||||
this.eventBus?.off('destinationWasSaved', this.onDestinationWasSaved);
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useLogStreamingStore),
|
||||
@@ -124,6 +119,15 @@ export default mixins(showMessage).extend({
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onDestinationWasSaved() {
|
||||
const updatedDestination = this.logStreamingStore.getDestination(this.destination.id);
|
||||
if (updatedDestination) {
|
||||
this.nodeParameters = Object.assign(
|
||||
deepCopy(defaultMessageEventBusDestinationOptions),
|
||||
this.destination,
|
||||
);
|
||||
}
|
||||
},
|
||||
async onClick(event?: PointerEvent) {
|
||||
if (
|
||||
event &&
|
||||
|
||||
Reference in New Issue
Block a user