From 8aa2b3d5acb18988bbe8c5445e39d5cf2c5bf050 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Wed, 28 Feb 2024 14:35:03 +0100 Subject: [PATCH] [web] Simplify method artwork_url --- web-src/src/components/ModalDialogAlbumSpotify.vue | 9 +++------ web-src/src/pages/PageAlbumSpotify.vue | 9 +++------ web-src/src/pages/PageMusicSpotify.vue | 5 +---- web-src/src/pages/PageMusicSpotifyNewReleases.vue | 5 +---- web-src/src/pages/PageSearchSpotify.vue | 5 +---- 5 files changed, 9 insertions(+), 24 deletions(-) diff --git a/web-src/src/components/ModalDialogAlbumSpotify.vue b/web-src/src/components/ModalDialogAlbumSpotify.vue index 55560f89..55b95667 100644 --- a/web-src/src/components/ModalDialogAlbumSpotify.vue +++ b/web-src/src/components/ModalDialogAlbumSpotify.vue @@ -7,7 +7,7 @@
0) { - return this.album.images[0].url - } - return '' + artwork_url(album) { + return album.images?.[0]?.url || '' } }, diff --git a/web-src/src/pages/PageAlbumSpotify.vue b/web-src/src/pages/PageAlbumSpotify.vue index e34ca9c5..db071cef 100644 --- a/web-src/src/pages/PageAlbumSpotify.vue +++ b/web-src/src/pages/PageAlbumSpotify.vue @@ -25,7 +25,7 @@