mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-11 04:42:34 +01:00
Fix unresponsive handler being attached many times
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user