mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 03:55:22 +02:00
getAll if array is empty or non existant (#3120)
Some checks failed
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Nightly Production / Backend Server Tests (push) Has been cancelled
Docker Nightly Production / Frontend and End-to-End Tests (push) Has been cancelled
Docker Nightly Production / Build Tagged Release (push) Has been cancelled
Docker Nightly Production / Notify Discord (push) Has been cancelled
Some checks failed
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Docker Nightly Production / Backend Server Tests (push) Has been cancelled
Docker Nightly Production / Frontend and End-to-End Tests (push) Has been cancelled
Docker Nightly Production / Build Tagged Release (push) Has been cancelled
Docker Nightly Production / Notify Discord (push) Has been cancelled
This commit is contained in:
parent
8a3173094e
commit
13e7dfe920
3 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@ export function useLabelStore() {
|
|||
const actions = {
|
||||
...useStoreActions<MultiPurposeLabelOut>(api.multiPurposeLabels, labelStore, loading),
|
||||
flushStore() {
|
||||
labelStore.value =[];
|
||||
labelStore.value = [];
|
||||
},
|
||||
};
|
||||
|
||||
if (!labelStore.value) {
|
||||
if (!labelStore.value || labelStore.value?.length === 0) {
|
||||
labelStore = actions.getAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ export const useUnitStore = function () {
|
|||
},
|
||||
};
|
||||
|
||||
if (!unitStore.value) {
|
||||
if (!unitStore.value || unitStore.value.length === 0) {
|
||||
unitStore = actions.getAll();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue