fixed: do not override local data if remote data is empty
This commit is contained in:
parent
37eed8736f
commit
afd3aeab37
7
main.js
7
main.js
|
@ -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 =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue