fixed: do not override local data if remote data is empty

This commit is contained in:
quenousimporte 2023-11-03 14:59:37 +01:00
parent 37eed8736f
commit afd3aeab37
1 changed files with 5 additions and 2 deletions

View File

@ -1283,8 +1283,11 @@ function init()
queryremote({action: "fetch"}) queryremote({action: "fetch"})
.then(data => .then(data =>
{ {
window.localStorage.setItem("data", JSON.stringify(data)); if (data.length)
loadstorage(); {
window.localStorage.setItem("data", JSON.stringify(data));
loadstorage();
}
}) })
.catch(err => .catch(err =>
{ {