Skip to content

Commit 4f2ffa0

Browse files
committed
1 parent 5dec587 commit 4f2ffa0

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/vs/workbench/browser/parts/titlebar/menubarControl.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -415,14 +415,16 @@ export class MenubarControl extends Disposable {
415415
}
416416

417417
private updateMnemonicVisibility(visible: boolean): void {
418-
this.customMenus.forEach(customMenu => {
419-
if (customMenu.titleElement.children.length) {
420-
let child = customMenu.titleElement.children.item(0) as HTMLElement;
421-
if (child) {
422-
child.style.textDecoration = visible ? 'underline' : null;
418+
if (this.customMenus) {
419+
this.customMenus.forEach(customMenu => {
420+
if (customMenu.titleElement.children.length) {
421+
let child = customMenu.titleElement.children.item(0) as HTMLElement;
422+
if (child) {
423+
child.style.textDecoration = visible ? 'underline' : null;
424+
}
423425
}
424-
}
425-
});
426+
});
427+
}
426428
}
427429

428430
private onRecentlyOpenedChange(): void {

0 commit comments

Comments
 (0)