From 6551c96ded3309db7820d9c7c007d2cfd9934eef Mon Sep 17 00:00:00 2001 From: Willy Bruns Date: Mon, 17 Oct 2016 22:59:52 -0700 Subject: [PATCH] fix Brave crash on confirm bug - `dialog.showMessageBox` requires that the message and title arguments are strings - if they are numbers instead, they are now coerced to strings before passing them to `showMessageBox` fixes #4883 --- app/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/index.js b/app/index.js index 4f155a19ad1..255e56b8b24 100644 --- a/app/index.js +++ b/app/index.js @@ -384,6 +384,15 @@ app.on('ready', () => { } buttons = ['OK', 'Cancel'] cancelId = 1 + + if (typeof message === 'number') { + message = '' + message + } + + if (typeof title === 'number') { + title = '' + title + } + event.returnValue = !dialog.showMessageBox(BrowserWindow.getFocusedWindow(), { message: message, title: title,