mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-23 23:11:12 +02:00
fix remote db access
This commit is contained in:
@@ -168,7 +168,8 @@ export const itemService = {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
window.db.getDb().then(remoteDb => {
|
const remoteDb = window.db.getDb();
|
||||||
|
|
||||||
const batch = writeBatch(remoteDb);
|
const batch = writeBatch(remoteDb);
|
||||||
/* eslint-disable guard-for-in */
|
/* eslint-disable guard-for-in */
|
||||||
for (var id in items) {
|
for (var id in items) {
|
||||||
@@ -184,7 +185,6 @@ export const itemService = {
|
|||||||
}
|
}
|
||||||
batch.commit().then(d.resolve);
|
batch.commit().then(d.resolve);
|
||||||
/* eslint-enable guard-for-in */
|
/* eslint-enable guard-for-in */
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return d.promise;
|
return d.promise;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user