From 5508fbee2f694ff8316969ebb245fbb2412f01d0 Mon Sep 17 00:00:00 2001 From: DanSylvest Date: Wed, 24 Sep 2025 11:07:52 +0300 Subject: [PATCH] fix(Map): MIGRATION: support from old store settings import --- .../mapRootContent/components/OldSettingsDialog.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/js/hooks/Mapper/components/mapRootContent/components/OldSettingsDialog.tsx b/assets/js/hooks/Mapper/components/mapRootContent/components/OldSettingsDialog.tsx index e886c653..400c0fe1 100644 --- a/assets/js/hooks/Mapper/components/mapRootContent/components/OldSettingsDialog.tsx +++ b/assets/js/hooks/Mapper/components/mapRootContent/components/OldSettingsDialog.tsx @@ -18,10 +18,7 @@ import { Toast } from 'primereact/toast'; import { useCallback, useRef } from 'react'; const createSettings = function (lsSettings: string | null, defaultValues: T) { - return { - version: -1, - settings: lsSettings ? JSON.parse(lsSettings) : defaultValues, - }; + return lsSettings ? JSON.parse(lsSettings) : defaultValues; }; export const OldSettingsDialog = () => { @@ -44,6 +41,8 @@ export const OldSettingsDialog = () => { const signatures = localStorage.getItem('wanderer_system_signature_settings_v6_6'); const out: MapUserSettings = { + version: 0, + migratedFromOld: false, killsWidget: createSettings(widgetKills, DEFAULT_KILLS_WIDGET_SETTINGS), localWidget: createSettings(widgetLocal, DEFAULT_WIDGET_LOCAL_SETTINGS), widgets: createSettings(widgetsOld, getDefaultWidgetProps()),