mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-13 01:56:24 +02:00
itemservice: initize items before setting
This commit is contained in:
@ -138,7 +138,8 @@
|
|||||||
batch.update(remoteDb.doc(`users/${window.user.uid}`), {
|
batch.update(remoteDb.doc(`users/${window.user.uid}`), {
|
||||||
[`items.${id}`]: true
|
[`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;
|
window.user.items[id] = true;
|
||||||
}
|
}
|
||||||
batch.commit().then(d.resolve);
|
batch.commit().then(d.resolve);
|
||||||
|
Reference in New Issue
Block a user