mirror of
https://github.com/romancm/gamebrary
synced 2024-11-27 13:40:48 +00:00
clean up get wallpaper method
This commit is contained in:
parent
216b3e34db
commit
20caef9c56
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue