diff options
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts index e421511..9029940 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,9 +33,10 @@ import { type BrowserState, defaultState, persistState, restoreState } from "./s import { registerAllTools } from "./registry"; import { cleanupTempDirs } from "./util/truncate"; import { createDaemonTransport } from "./cdp/daemon-transport"; +import { asString } from "./util/guards"; export default function browserHarnessExtension(pi: ExtensionAPI): void { - const flagNs = pi.getFlag("browser-namespace") as string | undefined; + const flagNs = asString(pi.getFlag("browser-namespace")); const namespace = flagNs ?? `pi-${Math.random().toString(36).slice(2, 10)}`; let state: BrowserState = defaultState(namespace); |
