Skip to content

Commit fde4858

Browse files
author
Jackson Kearl
committed
1 parent 933fff6 commit fde4858

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,11 @@ export class GettingStartedPage extends EditorPane {
650650
let stepElement = this.container.querySelector<HTMLDivElement>(`[data-step-id="${id}"]`);
651651
if (!stepElement) {
652652
// Selected an element that is not in-context, just fallback to whatever.
653-
stepElement = assertIsDefined(this.container.querySelector<HTMLDivElement>(`[data-step-id]`));
653+
stepElement = this.container.querySelector<HTMLDivElement>(`[data-step-id]`);
654+
if (!stepElement) {
655+
// No steps around... just ignore.
656+
return;
657+
}
654658
id = assertIsDefined(stepElement.getAttribute('data-step-id'));
655659
}
656660
stepElement.parentElement?.querySelectorAll<HTMLElement>('.expanded').forEach(node => {

0 commit comments

Comments
 (0)