diff --git a/atom/browser/ui/cocoa/atom_touch_bar.mm b/atom/browser/ui/cocoa/atom_touch_bar.mm index 72777c491f8a6..44ae7d4f3ea19 100644 --- a/atom/browser/ui/cocoa/atom_touch_bar.mm +++ b/atom/browser/ui/cocoa/atom_touch_bar.mm @@ -623,9 +623,14 @@ - (void)updateSegmentedControl:(NSCustomTouchBarItem*)item segments[i].Get("enabled", &enabled); if (segments[i].Get("label", &label)) { [control setLabel:base::SysUTF8ToNSString(label) forSegment:i]; - } else if (segments[i].Get("icon", &image)) { + } else { + [control setLabel:@"" forSegment:i]; + } + if (segments[i].Get("icon", &image)) { [control setImage:image.AsNSImage() forSegment:i]; [control setImageScaling:NSImageScaleProportionallyUpOrDown forSegment:i]; + } else { + [control setImage:nil forSegment:i]; } [control setEnabled:enabled forSegment:i]; }