From 3af37c0f5078fa8ec8647315370c8256a4368696 Mon Sep 17 00:00:00 2001 From: Roman Cervantes Date: Mon, 8 Apr 2019 23:10:53 -0700 Subject: [PATCH] Null checks --- src/App.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 86cc8929..f122ce38 100755 --- a/src/App.vue +++ b/src/App.vue @@ -68,7 +68,7 @@ export default { }, 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 : ''; }, @@ -77,7 +77,9 @@ export default { watch: { customWallpaper(value) { if (value) { - this.loadWallpaper(); + if (this.platform) { + this.loadWallpaper(); + } } else { this.$store.commit('SET_WALLPAPER_URL', ''); }