mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:11:23 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -5,7 +5,9 @@ export type BrowserControlServer = {
|
||||
};
|
||||
|
||||
export async function startBrowserControlServerIfEnabled(): Promise<BrowserControlServer | null> {
|
||||
if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER)) return null;
|
||||
if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER)) {
|
||||
return null;
|
||||
}
|
||||
// Lazy import: keeps startup fast, but still bundles for the embedded
|
||||
// gateway (bun --compile) via the static specifier path.
|
||||
const override = process.env.OPENCLAW_BROWSER_CONTROL_MODULE?.trim();
|
||||
@@ -21,7 +23,9 @@ export async function startBrowserControlServerIfEnabled(): Promise<BrowserContr
|
||||
typeof (mod as { stopBrowserControlService?: unknown }).stopBrowserControlService === "function"
|
||||
? (mod as { stopBrowserControlService: () => Promise<void> }).stopBrowserControlService
|
||||
: (mod as { stopBrowserControlServer?: () => Promise<void> }).stopBrowserControlServer;
|
||||
if (!start) return null;
|
||||
if (!start) {
|
||||
return null;
|
||||
}
|
||||
await start();
|
||||
return { stop: stop ?? (async () => {}) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user