mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Verify selectedIndex to prevent NSRangeException
This commit is contained in:
@@ -45,8 +45,9 @@ describe('TouchBar module', function () {
|
||||
new TouchBarSegmentedControl({
|
||||
segmentStyle: 'capsule',
|
||||
segments: [{label: 'baz', enabled: false}],
|
||||
selectedIndex: 0
|
||||
})
|
||||
selectedIndex: 5
|
||||
}),
|
||||
new TouchBarSegmentedControl({segments: []})
|
||||
])
|
||||
window.setTouchBar(touchBar)
|
||||
label.label = 'baz'
|
||||
|
||||
Reference in New Issue
Block a user