fixed two more comparisons

This commit is contained in:
vabene1111 2024-02-17 08:19:46 +01:00
parent e409fc03e9
commit b3a283c1a4
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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])