1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-12 09:36:32 +02:00

itemservice: initize items before setting

This commit is contained in:
Kushagra Gour
2018-01-23 19:33:32 +05:30
parent e7c97db31b
commit 1c46fc7dc0

View File

@ -138,7 +138,8 @@
batch.update(remoteDb.doc(`users/${window.user.uid}`), {
[`items.${id}`]: true
});
// Set these items on out cached user object too
// Set these items on our cached user object too
window.user.items = window.user.items || {};
window.user.items[id] = true;
}
batch.commit().then(d.resolve);