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]