fix: correctly plumb checkboxChecked on win (#21248)
* fix: correctly plumb checkboxChecked on win * address final style comment
This commit is contained in:
parent
d25256dcf5
commit
5f365858c9
3 changed files with 34 additions and 28 deletions
|
@ -178,6 +178,9 @@ const messageBox = (sync, window, options) => {
|
|||
if (typeof checkboxLabel !== 'string') throw new TypeError('checkboxLabel must be a string')
|
||||
|
||||
checkboxChecked = !!checkboxChecked
|
||||
if (checkboxChecked && !checkboxLabel) {
|
||||
throw new Error('checkboxChecked requires that checkboxLabel also be passed')
|
||||
}
|
||||
|
||||
// Choose a default button to get selected when dialog is cancelled.
|
||||
if (cancelId == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue