Fix infinite loading for weapon chart

This commit is contained in:
2023-05-26 16:03:01 +02:00
parent 72105b3a4c
commit 46a94b7898
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -58,6 +58,8 @@ function fetchWithLoading (url: string, progress: (percentage: number) => void)
reader.read().then(({ done, value }) => {
if (done) {
controller.close()
console.log('ended')
progress(1)
return
}
if (value) {
@@ -181,6 +183,7 @@ export const useKillStore = defineStore('kill', {
filter = removeNullEntries(filter)
let entry = this.weapons.find((e) => objectEqual(unref(e).filter, filter))
if (!entry) {
console.log(filter)
entry = shallowRef({ filter, data: {} })
this.weapons.push(entry)
}