From 604b1d3fdf046750e187236604e96c99b60021f5 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Thu, 21 Mar 2024 21:01:13 +0100 Subject: [PATCH] [web] Lint the source code --- web-src/src/pages/PageSearchSpotify.vue | 16 +++++++--------- web-src/src/pages/PageSettingsOnlineServices.vue | 4 +--- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/web-src/src/pages/PageSearchSpotify.vue b/web-src/src/pages/PageSearchSpotify.vue index fa0e7f4f..6e79e60c 100644 --- a/web-src/src/pages/PageSearchSpotify.vue +++ b/web-src/src/pages/PageSearchSpotify.vue @@ -423,7 +423,7 @@ export default { name: 'search-spotify', query: { query: this.$route.query.query, - type: type + type } }) }, @@ -446,8 +446,8 @@ export default { return } this.query.query = this.search_query - this.search_param.limit = this.query.limit ? this.query.limit : PAGE_SIZE - this.search_param.offset = this.query.offset ? this.query.offset : 0 + this.search_param.limit = this.query.limit ?? PAGE_SIZE + this.search_param.offset = this.query.offset ?? 0 this.$store.dispatch('add_recent_search', this.query.query) this.search_all() }, @@ -461,12 +461,10 @@ export default { }, search_all() { this.spotify_search().then((data) => { - this.tracks = data.tracks ? data.tracks : { items: [], total: 0 } - this.artists = data.artists ? data.artists : { items: [], total: 0 } - this.albums = data.albums ? data.albums : { items: [], total: 0 } - this.playlists = data.playlists - ? data.playlists - : { items: [], total: 0 } + this.tracks = data.tracks ?? { items: [], total: 0 } + this.artists = data.artists ?? { items: [], total: 0 } + this.albums = data.albums ?? { items: [], total: 0 } + this.playlists = data.playlists ?? { items: [], total: 0 } }) }, search_artists_next({ loaded }) { diff --git a/web-src/src/pages/PageSettingsOnlineServices.vue b/web-src/src/pages/PageSettingsOnlineServices.vue index cf0eb9c9..1965de64 100644 --- a/web-src/src/pages/PageSettingsOnlineServices.vue +++ b/web-src/src/pages/PageSettingsOnlineServices.vue @@ -162,9 +162,7 @@ export default { ) { return this.spotify.webapi_required_scope .split(' ') - .filter( - (scope) => this.spotify.webapi_granted_scope.indexOf(scope) < 0 - ) + .filter((scope) => !this.spotify.webapi_granted_scope.includes(scope)) } return [] },