clean up get wallpaper method

This commit is contained in:
Gamebrary 2021-09-14 21:57:26 -07:00
parent 216b3e34db
commit 20caef9c56

View file

@ -45,10 +45,12 @@ export default {
this.$store.dispatch('LOAD_PUBLIC_BOARDS');
},
// eslint-disable-next-line
getWallpaper({ wallpaper }) {
const boardWallpaper = this.wallpapers.find(({ fullPath }) => fullPath === wallpaper);
if (!wallpaper) return '';
return this.wallpapers.length && boardWallpaper && boardWallpaper.url;
this.$store.dispatch('LOAD_WALLPAPER', wallpaper)
.then(url => url);
},
viewBoard(id) {