fix: correctly plumb checkboxChecked on win (#21248)

* fix: correctly plumb checkboxChecked on win

* address final style comment
This commit is contained in:
Shelley Vohr 2019-11-26 23:39:07 -08:00 committed by Cheng Zhao
parent d25256dcf5
commit 5f365858c9
3 changed files with 34 additions and 28 deletions

View file

@ -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) {