Skip to content

Commit 56f4f77

Browse files
style(server): format the navigation script probe
AI-assisted; verified with the tests and tools listed above.
1 parent 5478acb commit 56f4f77

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/server/src/preview/ServerBrowserPage.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,13 @@ export const evaluate = async (
954954
export const stopUnresponsiveScript = async (cdp: CDPSession, budgetMs = SCRIPT_PROBE_MS) => {
955955
let timer: ReturnType<typeof setTimeout> | undefined;
956956
const expired = new Promise<void>((resolve) => {
957-
timer = setTimeout(() => {
958-
void cdp.send("Runtime.terminateExecution").catch(constVoid);
959-
resolve();
960-
}, Math.min(SCRIPT_PROBE_MS, budgetMs));
957+
timer = setTimeout(
958+
() => {
959+
void cdp.send("Runtime.terminateExecution").catch(constVoid);
960+
resolve();
961+
},
962+
Math.min(SCRIPT_PROBE_MS, budgetMs),
963+
);
961964
});
962965
const probe = cdp.send("Runtime.evaluate", { expression: "0" }).then(constVoid, constVoid);
963966
await Promise.race([probe, expired]).finally(() => clearTimeout(timer));

0 commit comments

Comments
 (0)