mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(editor): Remove push event listeners when migrating away from the canvas (#10063)
This commit is contained in:
parent
3bde8453ef
commit
0d12f0a6b3
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onBeforeMount, onMounted } from 'vue';
|
||||
import { ref, computed, watch, onBeforeMount, onBeforeUnmount, onMounted } from 'vue';
|
||||
import type { RouteLocation, RouteLocationRaw } from 'vue-router';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import WorkflowDetails from '@/components/MainHeader/WorkflowDetails.vue';
|
||||
|
@ -57,6 +57,10 @@ onBeforeMount(() => {
|
|||
pushConnection.initialize();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
pushConnection.terminate();
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
dirtyState.value = uiStore.stateIsDirty;
|
||||
syncTabsWithRoute(route);
|
||||
|
|
Loading…
Reference in a new issue