fix(ext): init without initialTab throws error

This commit is contained in:
Simon
2026-03-18 19:36:02 +08:00
parent 61d598142d
commit 628c249d45
3 changed files with 16 additions and 13 deletions

View File

@@ -58,8 +58,6 @@ export class RemotePageController {
}
async getBrowserState(): Promise<BrowserState> {
if (!this.currentTabId) throw new Error('tabsController not initialized.')
let browserState = {} as BrowserState
debug('getBrowserState', this.currentTabId)
@@ -178,7 +176,7 @@ interface DomActionReturn {
/**
* Check if a URL can run content scripts.
*/
function isContentScriptAllowed(url: string | undefined): boolean {
export function isContentScriptAllowed(url: string | undefined): boolean {
if (!url) return false
const restrictedPatterns = [