From 5a8feca561f99fdcaa89a5de19864d65a4c6857a Mon Sep 17 00:00:00 2001 From: ltctceplrm <14954927+ltctceplrm@users.noreply.github.com> Date: Wed, 31 Jan 2024 23:04:16 +0100 Subject: [PATCH] Made sure to always allow default APIs --- src/api/APIManager.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/api/APIManager.ts b/src/api/APIManager.ts index 1e3c8cc..527eee3 100644 --- a/src/api/APIManager.ts +++ b/src/api/APIManager.ts @@ -23,8 +23,7 @@ export class APIManager { let res: MediaTypeModel[] = []; for (const api of this.apis) { - const apiSettings = [api.apiName, "game"].filter(s => s).join('') as keyof typeof this.plugin.settings; - if (apisToQuery.contains(api.apiName) && this.plugin.settings[apiSettings]) { + 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])) { const apiRes = await api.searchByTitle(query); res = res.concat(apiRes); }