mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses (#6021)
This commit is contained in:
@@ -12,11 +12,12 @@ describe('Data transformation expressions', () => {
|
||||
beforeEach(() => {
|
||||
wf.actions.visit();
|
||||
|
||||
cy.window()
|
||||
// @ts-ignore
|
||||
.then(
|
||||
(win) => win.onBeforeUnloadNodeView && win.removeEventListener('beforeunload', win.onBeforeUnloadNodeView),
|
||||
);
|
||||
cy.window().then(
|
||||
(win) => {
|
||||
// @ts-ignore
|
||||
win.preventNodeViewBeforeUnload = true;
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it('$json + native string methods', () => {
|
||||
|
||||
@@ -17,11 +17,12 @@ describe('Data mapping', () => {
|
||||
beforeEach(() => {
|
||||
workflowPage.actions.visit();
|
||||
|
||||
cy.window()
|
||||
// @ts-ignore
|
||||
.then(
|
||||
(win) => win.onBeforeUnloadNodeView && win.removeEventListener('beforeunload', win.onBeforeUnloadNodeView),
|
||||
);
|
||||
cy.window().then(
|
||||
(win) => {
|
||||
// @ts-ignore
|
||||
win.preventNodeViewBeforeUnload = true;
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it('maps expressions from table header', () => {
|
||||
|
||||
@@ -99,11 +99,12 @@ describe('Webhook Trigger node', async () => {
|
||||
beforeEach(() => {
|
||||
workflowPage.actions.visit();
|
||||
|
||||
cy.window()
|
||||
// @ts-ignore
|
||||
.then(
|
||||
(win) => win.onBeforeUnloadNodeView && win.removeEventListener('beforeunload', win.onBeforeUnloadNodeView),
|
||||
);
|
||||
cy.window().then(
|
||||
(win) => {
|
||||
// @ts-ignore
|
||||
win.preventNodeViewBeforeUnload = true;
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it('should listen for a GET request', () => {
|
||||
|
||||
Reference in New Issue
Block a user