This commit is contained in:
syuilo
2018-06-06 03:03:56 +09:00
parent f918081168
commit d8cd24fab0
3 changed files with 5 additions and 5 deletions

View File

@ -147,7 +147,7 @@ export default Vue.extend({
computed: {
home(): any[] {
return this.$store.state.settings.home;
return this.$store.state.settings.home || [];
},
left(): any[] {
return this.home.filter(w => w.place == 'left');
@ -164,9 +164,11 @@ export default Vue.extend({
},
created() {
if (this.$store.state.i.clientSettings == null || this.$store.state.i.clientSettings.home == null) {
if (this.$store.state.settings.home == null) {
this.api('i/update_home', {
home: _defaultDesktopHomeWidgets
}).then(() => {
this.$store.commit('settings/setHome', _defaultDesktopHomeWidgets);
});
}
},