diff --git a/src/modal/manager-modal.ts b/src/modal/manager-modal.ts index 541b400..b9f9bd9 100644 --- a/src/modal/manager-modal.ts +++ b/src/modal/manager-modal.ts @@ -353,13 +353,13 @@ export class ManagerModal extends Modal { private async openPluginMarket() { await this.appSetting.open(); - await this.appSetting.openTabById("community-plugins"); - window.setTimeout(() => { - const tab = this.appSetting.activeTab; - const marketButton = tab?.containerEl?.querySelector("button.mod-cta"); - marketButton?.click(); - }, 50); - } + await this.appSetting.openTabById("community-plugins"); + window.setTimeout(() => { + const tab = this.appSetting.activeTab; + const marketButton = tab?.containerEl?.querySelector("button.mod-cta") as HTMLButtonElement | null | undefined; + marketButton?.click(); + }, 50); + } private async runSinglePluginUpdateCheck(pluginId: string) { const progress = this.showInlineProgress(this.manager.translator.t("通知_检测更新中文案"), pluginId);