getAll if array is empty or non existant (#3120)

This commit is contained in:
Kuchenpirat
2024-02-05 14:37:15 +01:00
committed by GitHub
parent 8a3173094e
commit 13e7dfe920
3 changed files with 5 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ export const usePublicFoodStore = function (groupSlug: string) {
},
};
if (!foodStore.value) {
if (!foodStore.value || foodStore.value.length === 0) {
foodStore = actions.getAll();
}
@@ -61,7 +61,7 @@ export const useFoodStore = function () {
},
};
if (!foodStore) {
if (!foodStore.value || foodStore.value.length === 0) {
foodStore = actions.getAll();
}