fix(editor): Fix memory leak in Node Detail View by correctly unsubscribing from event buses (#6021)

This commit is contained in:
OlegIvaniv
2023-04-20 12:26:14 +02:00
committed by GitHub
parent 41660d9e28
commit 0970ec066d
13 changed files with 98 additions and 97 deletions

View File

@@ -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', () => {