Skip to content

Commit 04da555

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
[Recorder] Fix missing element subtitle
Fixed: 381393590 Change-Id: Ieee0a510e3276fb7792026f826210b140cd72412 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6055480 Reviewed-by: Nikolay Vitkov <[email protected]> Commit-Queue: Alex Rudenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Auto-Submit: Alex Rudenko <[email protected]>
1 parent 9d043d2 commit 04da555

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

front_end/panels/recorder/components/StepView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ function getElementRoleTitle(role: string): string {
366366
}
367367
}
368368

369-
function getSelectorPreview(step?: Models.Schema.Step): string {
370-
if (!step || !('selectors' in step)) {
369+
function getSelectorPreview(step: Models.Schema.Step): string {
370+
if (!('selectors' in step)) {
371371
return '';
372372
}
373373

@@ -438,7 +438,7 @@ function viewFunction(input: ViewInput, _output: ViewOutput, target: HTMLElement
438438
step: input.step,
439439
section: input.section,
440440
});
441-
const subtitle = input.step ? getSelectorPreview() : getSectionPreview();
441+
const subtitle = input.step ? getSelectorPreview(input.step) : getSectionPreview();
442442

443443
// clang-format off
444444
LitHtml.render(

0 commit comments

Comments
 (0)