From 33051f4e460d16976e0a2bc7ba302bcab9b3b212 Mon Sep 17 00:00:00 2001 From: tiny-craft <137850705+tiny-craft@users.noreply.github.com> Date: Fri, 27 Oct 2023 13:01:18 +0800 Subject: [PATCH] fix: last preferences did not clone correctly --- frontend/src/stores/preferences.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/stores/preferences.js b/frontend/src/stores/preferences.js index fbb98c0..2dea9ff 100644 --- a/frontend/src/stores/preferences.js +++ b/frontend/src/stores/preferences.js @@ -1,6 +1,6 @@ import { defineStore } from 'pinia' import { lang } from '@/langs/index.js' -import { clone, find, get, isEmpty, map, pick, set, split } from 'lodash' +import { cloneDeep, find, get, isEmpty, map, pick, set, split } from 'lodash' import { CheckForUpdate, GetFontList, @@ -178,7 +178,7 @@ const usePreferencesStore = defineStore('preferences', { async loadPreferences() { const { success, data } = await GetPreferences() if (success) { - this.lastPref = clone(data) + this.lastPref = cloneDeep(data) this._applyPreferences(data) i18nGlobal.locale.value = this.currentLanguage }