From b3a283c1a4f0933218c9613363c65bd88e531bf2 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sat, 17 Feb 2024 08:19:46 +0100 Subject: [PATCH] fixed two more comparisons --- vue/src/stores/MealPlanStore.js | 2 +- vue/src/stores/UserPreferenceStore.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vue/src/stores/MealPlanStore.js b/vue/src/stores/MealPlanStore.js index 952a74eb..3cfcd4d7 100644 --- a/vue/src/stores/MealPlanStore.js +++ b/vue/src/stores/MealPlanStore.js @@ -47,7 +47,7 @@ export const useMealPlanStore = defineStore(_STORE_ID, { }, actions: { refreshFromAPI(from_date, to_date) { - if (this.currently_updating !== [from_date, to_date]) { + if (this.currently_updating != null && (this.currently_updating[0] !== from_date || this.currently_updating[1] !== to_date)) { this.currently_updating = [from_date, to_date] // certainly no perfect check but better than nothing let apiClient = new ApiApiFactory() diff --git a/vue/src/stores/UserPreferenceStore.js b/vue/src/stores/UserPreferenceStore.js index a22c5cc8..b457cfa5 100644 --- a/vue/src/stores/UserPreferenceStore.js +++ b/vue/src/stores/UserPreferenceStore.js @@ -90,7 +90,7 @@ export const useUserPreferenceStore = defineStore(_STORE_ID, { // ---------------- new methods for user settings loadUserSettings: function (allow_cached_results) { let s = localStorage.getItem(_LS_USER_SETTINGS) - if (!(s === null || s === {})) { + if (s !== null) { let settings = JSON.parse(s) for (s in settings) { Vue.set(this.user_settings, s, settings[s])