fix dialog when hitting close (#81)

This commit is contained in:
Lynn 2017-05-09 11:27:53 -07:00 committed by GitHub
parent 4087eb3acc
commit 1df319ee5b

View File

@ -28,7 +28,7 @@ function showLoadFailure(win, url, errorDesc, errorCode, retryCallback) {
type: 'error',
buttons: [ 'Reload', 'Ignore' ],
defaultId: 0,
cancelId: 0,
cancelId: 1,
noLink: true,
title: 'Loading Error',
message: msg
@ -36,12 +36,8 @@ function showLoadFailure(win, url, errorDesc, errorCode, retryCallback) {
// async handle of user input
function response(buttonId) {
// ignore button hit, do nothing
if (buttonId === 1) {
return;
}
if (typeof retryCallback === 'function') {
// retry if hitting butotn index 0 (i.e., reload)
if (buttonId === 0 && typeof retryCallback === 'function') {
retryCallback();
}
}