mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-03 11:57:34 +01:00
Merge pull request #2338 from MartinFournier/fix/electron-unresponsive-handler
Fix unresponsive handler being attached many times
This commit is contained in:
commit
338953fa1a
@ -48,11 +48,12 @@ function promptForReload(window) {
|
||||
}
|
||||
|
||||
function attachUnresponsiveAppHandler(window) {
|
||||
window.on('unresponsive', () => promptForReload(window));
|
||||
window.unresponsiveHandler = () => promptForReload(window);
|
||||
window.on('unresponsive', window.unresponsiveHandler);
|
||||
}
|
||||
|
||||
function detachUnresponsiveAppHandler(window) {
|
||||
window.off('unresponsive', () => promptForReload(window));
|
||||
window.off('unresponsive', window.unresponsiveHandler);
|
||||
}
|
||||
|
||||
function showErrorBox(title, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user