From e6db6a86b22c39ba660c3d517581dc00a4f32b87 Mon Sep 17 00:00:00 2001 From: CzBiX Date: Sat, 13 May 2023 17:29:21 +0800 Subject: [PATCH] support qb without tags feature, fix #151 --- src/store/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/index.ts b/src/store/index.ts index 0d411f4..dd64cd2 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -111,7 +111,8 @@ const store = new Vuex.Store({ } const finalTags: any[] = [] - for (const tag of state.mainData.tags) { + const tags = state.mainData.tags ?? []; + for (const tag of tags) { finalTags.push({ "key": tag, "name": tag, @@ -125,6 +126,10 @@ const store = new Vuex.Store({ torrentGroupByTag(state, getters) { const result: Record = {} for (const torrent of getters.allTorrents) { + if (!torrent.tags) { + continue; + } + const tags: string[] = torrent.tags.split(', '); tags.forEach(tag => { let list: Torrent[] = result[tag]