mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Fix local storage flags defaulting to undefined string (#7603)
useStorage takes the default value `undefined` and sets it in local storage.. also returns "undefined" as string which breaks onboarding flows Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useStorage } from '@vueuse/core';
|
||||
import { useStorage } from '@/composables/useStorage';
|
||||
import { LOCAL_STORAGE_MAPPING_IS_ONBOARDED, STORES } from '@/constants';
|
||||
import type {
|
||||
INodeUi,
|
||||
@@ -49,7 +49,7 @@ export const useNDVStore = defineStore(STORES.NDV, {
|
||||
canDrop: false,
|
||||
stickyPosition: null,
|
||||
},
|
||||
isMappingOnboarded: useStorage(LOCAL_STORAGE_MAPPING_IS_ONBOARDED, undefined).value === 'true',
|
||||
isMappingOnboarded: useStorage(LOCAL_STORAGE_MAPPING_IS_ONBOARDED).value === 'true',
|
||||
}),
|
||||
getters: {
|
||||
activeNode(): INodeUi | null {
|
||||
@@ -228,7 +228,7 @@ export const useNDVStore = defineStore(STORES.NDV, {
|
||||
disableMappingHint(store = true) {
|
||||
this.isMappingOnboarded = true;
|
||||
if (store) {
|
||||
window.localStorage.setItem(LOCAL_STORAGE_MAPPING_IS_ONBOARDED, 'true');
|
||||
useStorage(LOCAL_STORAGE_MAPPING_IS_ONBOARDED).value = 'true';
|
||||
}
|
||||
},
|
||||
updateNodeParameterIssues(issues: INodeIssues): void {
|
||||
|
||||
Reference in New Issue
Block a user