add missing return in methods

This commit is contained in:
Thomas Amland
2020-12-27 16:54:09 +01:00
parent ca94462d93
commit d002a5c09a
4 changed files with 7 additions and 8 deletions
+4 -5
View File
@@ -29,12 +29,11 @@
},
methods: {
toggleStarred() {
if (this.starred) {
this.$api.unstar('track', this.track.id)
} else {
this.$api.star('track', this.track.id)
}
this.starred = !this.starred
if (this.starred) {
return this.$api.unstar('track', this.track.id)
}
return this.$api.star('track', this.track.id)
},
setNextInQueue() {
return this.$store.dispatch('player/setNextInQueue', this.track)
+1 -1
View File
@@ -54,7 +54,7 @@
methods: {
loadMore() {
this.loading = true
this.$api.getAlbums(this.sort as AlbumSort, 50, this.offset).then(albums => {
return this.$api.getAlbums(this.sort as AlbumSort, 50, this.offset).then(albums => {
this.albums.push(...albums)
this.offset += albums.length
this.hasMore = albums.length > 0