mirror of
https://github.com/romancm/gamebrary
synced 2024-11-28 14:10:26 +00:00
Null checks
This commit is contained in:
parent
4f98cbceca
commit
3af37c0f50
1 changed files with 4 additions and 2 deletions
|
@ -68,7 +68,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
customWallpaper() {
|
customWallpaper() {
|
||||||
return this.settings && this.settings.wallpapers && this.settings.wallpapers[this.platform.code]
|
return this.settings && this.settings.wallpapers && this.platform && this.settings.wallpapers[this.platform.code]
|
||||||
? this.settings.wallpapers[this.platform.code].url
|
? this.settings.wallpapers[this.platform.code].url
|
||||||
: '';
|
: '';
|
||||||
},
|
},
|
||||||
|
@ -77,7 +77,9 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
customWallpaper(value) {
|
customWallpaper(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
this.loadWallpaper();
|
if (this.platform) {
|
||||||
|
this.loadWallpaper();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$store.commit('SET_WALLPAPER_URL', '');
|
this.$store.commit('SET_WALLPAPER_URL', '');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue