mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-22 17:06:24 -06:00
fix dialog when hitting close (#81)
This commit is contained in:
parent
4087eb3acc
commit
1df319ee5b
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user