fix: pass noLink correctly on Windows (#21386)

This commit is contained in:
Shelley Vohr 2019-12-05 13:38:57 -08:00 committed by Robo
parent 93802a7e6f
commit 9e189eac71
4 changed files with 11 additions and 16 deletions

View file

@ -163,6 +163,7 @@ const messageBox = (sync, window, options) => {
defaultId = -1,
detail = '',
icon = null,
noLink = false,
message = '',
title = '',
type = 'none'
@ -173,6 +174,7 @@ const messageBox = (sync, window, options) => {
if (!Array.isArray(buttons)) throw new TypeError('Buttons must be an array')
if (options.normalizeAccessKeys) buttons = buttons.map(normalizeAccessKey)
if (typeof title !== 'string') throw new TypeError('Title must be a string')
if (typeof noLink !== 'boolean') throw new TypeError('noLink must be a boolean')
if (typeof message !== 'string') throw new TypeError('Message must be a string')
if (typeof detail !== 'string') throw new TypeError('Detail must be a string')
if (typeof checkboxLabel !== 'string') throw new TypeError('checkboxLabel must be a string')
@ -195,15 +197,13 @@ const messageBox = (sync, window, options) => {
}
}
const flags = options.noLink ? messageBoxOptions.noLink : 0
const settings = {
window,
messageBoxType,
buttons,
defaultId,
cancelId,
flags,
noLink,
title,
message,
detail,