File tree Expand file tree Collapse file tree
src/vs/workbench/browser/parts/titlebar Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments