format code

This commit is contained in:
Chris Tate
2026-01-18 11:14:03 -06:00
parent a8dcbb1222
commit 3142858f30
2 changed files with 5 additions and 10 deletions
+4 -7
View File
@@ -1286,13 +1286,10 @@ async function handleStyles(
// Check if it's a ref - single element // Check if it's a ref - single element
if (browser.isRef(command.selector)) { if (browser.isRef(command.selector)) {
const locator = browser.getLocator(command.selector); const locator = browser.getLocator(command.selector);
const element = (await locator.evaluate( const element = (await locator.evaluate((el, script) => {
(el, script) => { const fn = eval(script);
const fn = eval(script); return fn(el);
return fn(el); }, extractStylesScript)) as StylesData['elements'][0];
},
extractStylesScript
)) as StylesData['elements'][0];
return successResponse(command.id, { elements: [element] }); return successResponse(command.id, { elements: [element] });
} }
+1 -3
View File
@@ -739,9 +739,7 @@ export class BrowserManager {
} }
// Filter out pages with empty URLs, which can cause Playwright to hang // Filter out pages with empty URLs, which can cause Playwright to hang
const allPages = contexts const allPages = contexts.flatMap((context) => context.pages()).filter((page) => page.url());
.flatMap((context) => context.pages())
.filter((page) => page.url());
if (allPages.length === 0) { if (allPages.length === 0) {
throw new Error('No page found. Make sure the app has loaded content.'); throw new Error('No page found. Make sure the app has loaded content.');