mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
fix(offline state #5511)
* make local state merging conditional on online status
This commit is contained in:
parent
4f23153dae
commit
048537952a
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ export function useShoppingListItemActions(shoppingListId: string) {
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
const response = await api.shopping.lists.getOne(shoppingListId);
|
const response = await api.shopping.lists.getOne(shoppingListId);
|
||||||
if (response.data) {
|
if (window.$nuxt.isOffline && response.data) {
|
||||||
const createAndUpdateQueues = mergeListItemsByLatest(queue.update, queue.create);
|
const createAndUpdateQueues = mergeListItemsByLatest(queue.update, queue.create);
|
||||||
response.data.listItems = mergeListItemsByLatest(response.data.listItems ?? [], createAndUpdateQueues);
|
response.data.listItems = mergeListItemsByLatest(response.data.listItems ?? [], createAndUpdateQueues);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue