mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-12 17:46:26 +02:00
itemservice: initize items before setting
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user