Skip to content

Commit 5a8feca

Browse files
committed
Made sure to always allow default APIs
1 parent 508b0ed commit 5a8feca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/api/APIManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export class APIManager {
2323

2424
let res: MediaTypeModel[] = [];
2525
for (const api of this.apis) {
26-
const apiSettings = [api.apiName, "game"].filter(s => s).join('') as keyof typeof this.plugin.settings;
27-
if (apisToQuery.contains(api.apiName) && this.plugin.settings[apiSettings]) {
26+
if (apisToQuery.contains(api.apiName) && (this.plugin.settings[[api.apiName, "game"].filter(s => s).join('') as keyof typeof this.plugin.settings] || this.plugin.settings[[api.apiName, "default"].filter(s => s).join('') as keyof typeof this.plugin.settings])) {
2827
const apiRes = await api.searchByTitle(query);
2928
res = res.concat(apiRes);
3029
}

0 commit comments

Comments
 (0)