From 3142858f3051eae09c5404c68c20ca8f99b65c6c Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Sun, 18 Jan 2026 11:14:03 -0600 Subject: [PATCH] format code --- src/actions.ts | 11 ++++------- src/browser.ts | 4 +--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/actions.ts b/src/actions.ts index 2bef0df..7fde0dd 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -1286,13 +1286,10 @@ async function handleStyles( // Check if it's a ref - single element if (browser.isRef(command.selector)) { const locator = browser.getLocator(command.selector); - const element = (await locator.evaluate( - (el, script) => { - const fn = eval(script); - return fn(el); - }, - extractStylesScript - )) as StylesData['elements'][0]; + const element = (await locator.evaluate((el, script) => { + const fn = eval(script); + return fn(el); + }, extractStylesScript)) as StylesData['elements'][0]; return successResponse(command.id, { elements: [element] }); } diff --git a/src/browser.ts b/src/browser.ts index 693c348..70ef6eb 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -739,9 +739,7 @@ export class BrowserManager { } // Filter out pages with empty URLs, which can cause Playwright to hang - const allPages = contexts - .flatMap((context) => context.pages()) - .filter((page) => page.url()); + const allPages = contexts.flatMap((context) => context.pages()).filter((page) => page.url()); if (allPages.length === 0) { throw new Error('No page found. Make sure the app has loaded content.');