Fix compiler errors

This commit is contained in:
Miguel Solorio
2019-11-13 19:55:49 -08:00
parent c9f9081e2f
commit 353510eeec
2 changed files with 2 additions and 2 deletions

View File

@@ -1096,7 +1096,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
private createTouchBarGroupSegments(items: ISerializableCommandAction[] = []): ITouchBarSegment[] {
const segments: ITouchBarSegment[] = items.map(item => {
let icon: NativeImage | undefined;
if (item.iconLocation && item.iconLocation.dark.scheme === 'file') {
if (item.iconLocation && typeof item.iconLocation?.dark !== 'undefined' && item.iconLocation.dark.scheme === 'file') {
icon = nativeImage.createFromPath(URI.revive(item.iconLocation.dark).fsPath);
if (icon.isEmpty()) {
icon = undefined;