From fdaddfcc035bf4bc772824fda81e05ccf27e39b0 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Sun, 23 Jan 2022 10:17:02 +0700 Subject: [PATCH] fix missing data on collection list --- src/renderer/views/pages/collection-list.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/views/pages/collection-list.ejs b/src/renderer/views/pages/collection-list.ejs index 397354f7..2da336ad 100644 --- a/src/renderer/views/pages/collection-list.ejs +++ b/src/renderer/views/pages/collection-list.ejs @@ -85,8 +85,8 @@ this.api.v3.music(this.data.next, app.collectionList.requestBody).then((response) => { console.log(response) if (!app.collectionList.response.groups) { + this.data.data = this.data.data.concat(response.data.data); if (response.data.next) { - this.data.data = this.data.data.concat(response.data.data); this.data.next = response.data.next; this.triggerEnabled = true; } @@ -96,8 +96,8 @@ this.loading = false return } + this.data.data = this.data.data.concat(response.data.results[app.collectionList.response.groups].data); if (response.data.results[app.collectionList.response.groups].next) { - this.data.data = this.data.data.concat(response.data.results[app.collectionList.response.groups].data); this.data.next = response.data.results[app.collectionList.response.groups].next; this.triggerEnabled = true; this.loading = false