improve ternary evaluation

This commit is contained in:
Gamebrary 2021-02-21 18:21:08 -07:00
parent b7b64f5109
commit 8632fe3c77

View file

@ -97,7 +97,9 @@ export default {
getWallpaper({ wallpaper }) {
const boardWallpaper = this.wallpapers.find(({ fullPath }) => fullPath === wallpaper);
return this.wallpapers.length && boardWallpaper && boardWallpaper.url;
return this.wallpapers.length > 0 && boardWallpaper && boardWallpaper.url
? boardWallpaper.url
: null;
},
getPlatformImage(id) {