Fix exception in alert for inavlid parameter
This commit is contained in:
parent
b0f3443d72
commit
18a38dbfc1
1 changed files with 4 additions and 13 deletions
|
@ -154,20 +154,11 @@ window.open = function (url, frameName, features) {
|
|||
}
|
||||
|
||||
// Use the dialog API to implement alert().
|
||||
window.alert = function (message, title) {
|
||||
var buttons
|
||||
if (arguments.length === 0) {
|
||||
message = ''
|
||||
}
|
||||
if (title == null) {
|
||||
title = ''
|
||||
}
|
||||
buttons = ['OK']
|
||||
message = String(message)
|
||||
window.alert = function (message = '', title = '') {
|
||||
remote.dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
message: message,
|
||||
title: title,
|
||||
buttons: buttons
|
||||
message: String(message),
|
||||
title: String(title),
|
||||
buttons: ['OK']
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue