fix(editor): Handle localStorage being blocked/unavailable (#7348)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-27 15:51:20 +02:00
committed by GitHub
parent 739a4d4ecf
commit c05bc6728d
10 changed files with 69 additions and 45 deletions

View File

@@ -1,5 +1,6 @@
import { defineComponent } from 'vue';
import { mapStores } from 'pinia';
import { useStorage } from '@vueuse/core';
import { externalHooks } from '@/mixins/externalHooks';
import { workflowHelpers } from '@/mixins/workflowHelpers';
@@ -121,7 +122,7 @@ export const workflowActivate = defineComponent({
if (isCurrentWorkflow) {
if (
newActiveState &&
window.localStorage.getItem(LOCAL_STORAGE_ACTIVATION_FLAG) !== 'true'
useStorage(LOCAL_STORAGE_ACTIVATION_FLAG, undefined).value !== 'true'
) {
this.uiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);
} else {