mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix(editor): Handle localStorage being blocked/unavailable (#7348)
This commit is contained in:
committed by
GitHub
parent
739a4d4ecf
commit
c05bc6728d
@@ -495,6 +495,7 @@
|
||||
import { defineAsyncComponent, defineComponent } from 'vue';
|
||||
import type { PropType } from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useStorage } from '@vueuse/core';
|
||||
import { saveAs } from 'file-saver';
|
||||
import type {
|
||||
ConnectionTypes,
|
||||
@@ -975,12 +976,12 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
value &&
|
||||
value.length > 0 &&
|
||||
!this.isReadOnlyRoute &&
|
||||
!localStorage.getItem(LOCAL_STORAGE_PIN_DATA_DISCOVERY_NDV_FLAG)
|
||||
) {
|
||||
const pinDataDiscoveryFlag = useStorage(
|
||||
LOCAL_STORAGE_PIN_DATA_DISCOVERY_NDV_FLAG,
|
||||
undefined,
|
||||
).value;
|
||||
|
||||
if (value && value.length > 0 && !this.isReadOnlyRoute && !pinDataDiscoveryFlag) {
|
||||
this.pinDataDiscoveryComplete();
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user