mk list search fix

This commit is contained in:
Drew Ansbacher
2021-09-30 12:29:12 -06:00
committed by Aiden McClelland
parent 4a63e3079c
commit f5f6b92d1b

View File

@@ -96,7 +96,9 @@ export class MarketplaceListPage {
}
async search (): Promise<void> {
this.category = undefined
if (this.query) {
this.category = undefined
}
await this.filterPkgs()
}
@@ -140,7 +142,7 @@ export class MarketplaceListPage {
}
const fuse = new Fuse(pkgsToSort, { ...defaultOps, threshold: 1 })
this.pkgs = fuse.search(this.category !== 'all' ? this.category : 'bit').map(p => p.item)
this.pkgs = fuse.search(this.category !== 'all' ? this.category || '' : 'bit').map(p => p.item)
}
}
}