mirror of
https://github.com/romancm/gamebrary
synced 2025-02-17 19:48:24 +00:00
fix error for first time users
This commit is contained in:
parent
d707269850
commit
3c5ff6f925
1 changed files with 2 additions and 6 deletions
|
@ -58,11 +58,9 @@ export default {
|
|||
const docRef = db.collection('settings').doc(this.user.uid);
|
||||
|
||||
docRef.get().then((doc) => {
|
||||
const hasData = doc && doc.exists;
|
||||
const settings = doc.data();
|
||||
|
||||
return hasData
|
||||
? this.$store.commit('SET_SETTINGS', doc.data())
|
||||
: this.initSettings();
|
||||
this.$store.commit('SET_SETTINGS', settings);
|
||||
}).catch(() => {
|
||||
this.$store.commit('SET_SESSION_EXPIRED', true);
|
||||
});
|
||||
|
@ -89,8 +87,6 @@ export default {
|
|||
if (doc.exists) {
|
||||
const data = doc.data();
|
||||
this.$store.commit('SET_GAME_LISTS_LEGACY', data);
|
||||
} else {
|
||||
this.initList();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue