mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -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">
|
<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 type { RouteLocation, RouteLocationRaw } from 'vue-router';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRouter, useRoute } from 'vue-router';
|
||||||
import WorkflowDetails from '@/components/MainHeader/WorkflowDetails.vue';
|
import WorkflowDetails from '@/components/MainHeader/WorkflowDetails.vue';
|
||||||
|
@ -57,6 +57,10 @@ onBeforeMount(() => {
|
||||||
pushConnection.initialize();
|
pushConnection.initialize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
pushConnection.terminate();
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
dirtyState.value = uiStore.stateIsDirty;
|
dirtyState.value = uiStore.stateIsDirty;
|
||||||
syncTabsWithRoute(route);
|
syncTabsWithRoute(route);
|
||||||
|
|
Loading…
Reference in a new issue