style: format locator selector

This commit is contained in:
Peter Steinberger
2025-12-24 21:49:31 +01:00
parent 4d4308af78
commit 8ee62f0ac8

View File

@@ -16,7 +16,8 @@ function resolveLocator(
page: LocatorPage,
opts: { ref?: string; selector?: string },
) {
const selector = typeof opts.selector === "string" ? opts.selector.trim() : "";
const selector =
typeof opts.selector === "string" ? opts.selector.trim() : "";
if (selector) return page.locator(selector);
const ref = typeof opts.ref === "string" ? opts.ref.trim() : "";
if (ref) return refLocator(page, ref);