diff --git a/lib/browser/api/touch-bar.js b/lib/browser/api/touch-bar.js index a6e2e593ccd5..0d428cb0f01f 100644 --- a/lib/browser/api/touch-bar.js +++ b/lib/browser/api/touch-bar.js @@ -218,14 +218,14 @@ TouchBar.TouchBarSegmentedControl = class TouchBarSegmentedControl extends Touch if (config == null) config = {} const {segmentStyle, segments, selectedIndex, change} = config this.type = 'segmented_control' - this._addLiveProperty('segmentStyle', segmentStyle); - this._addLiveProperty('segments', segments || []); + this._addLiveProperty('segmentStyle', segmentStyle) + this._addLiveProperty('segments', segments || []) this._addLiveProperty('selectedIndex', selectedIndex) if (typeof change === 'function') { this.onInteraction = (details) => { - this._selectedIndex = details.selectedIndex; - change(details.selectedIndex); + this._selectedIndex = details.selectedIndex + change(details.selectedIndex) } } }