Skip to content

Commit d6b08ef

Browse files
committed
Eslint fix
1 parent 72874f0 commit d6b08ef

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

packages/app/src/components/browser/snapshot.ts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ export class DevtoolsBrowser extends Element {
298298
// at capture time), then fall back to the already-resolved active URL, and
299299
// finally to the context metadata URL. This avoids a race where metadata
300300
// arrives after the first childList mutation fires #renderNewDocument.
301-
const baseUrl = mutation.url || this.#activeUrl || this.metadata?.url || 'unknown'
301+
const baseUrl =
302+
mutation.url || this.#activeUrl || this.metadata?.url || 'unknown'
302303
this.#renderNewDocument(
303304
mutation.addedNodes[0] as SimplifiedVNode,
304305
baseUrl
@@ -419,9 +420,13 @@ export class DevtoolsBrowser extends Element {
419420

420421
/** Latest screenshot from any command — auto-updates the preview as tests run. */
421422
get #latestAutoScreenshot(): string | null {
422-
if (!this.commands?.length) return null
423+
if (!this.commands?.length) {
424+
return null
425+
}
423426
for (let i = this.commands.length - 1; i >= 0; i--) {
424-
if (this.commands[i].screenshot) return this.commands[i].screenshot!
427+
if (this.commands[i].screenshot) {
428+
return this.commands[i].screenshot!
429+
}
425430
}
426431
return null
427432
}
@@ -459,21 +464,24 @@ export class DevtoolsBrowser extends Element {
459464
</div>
460465
</header>
461466
${this.#screenshotData
462-
? html`
463-
<div class="iframe-wrapper">
464-
<div class="screenshot-overlay" style="position:relative;flex:1;min-height:0;">
467+
? html` <div class="iframe-wrapper">
468+
<div
469+
class="screenshot-overlay"
470+
style="position:relative;flex:1;min-height:0;"
471+
>
465472
<img src="data:image/png;base64,${this.#screenshotData}" />
466473
</div>
467474
</div>`
468475
: hasMutations
469-
? html`
470-
<div class="iframe-wrapper">
476+
? html` <div class="iframe-wrapper">
471477
<iframe class="origin-top-left"></iframe>
472478
</div>`
473479
: displayScreenshot
474-
? html`
475-
<div class="iframe-wrapper">
476-
<div class="screenshot-overlay" style="position:relative;flex:1;min-height:0;">
480+
? html` <div class="iframe-wrapper">
481+
<div
482+
class="screenshot-overlay"
483+
style="position:relative;flex:1;min-height:0;"
484+
>
477485
<img src="data:image/png;base64,${displayScreenshot}" />
478486
</div>
479487
</div>`

0 commit comments

Comments
 (0)