diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/main.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/share/js/kvm/main.js b/web/share/js/kvm/main.js index 7c1b9f46..15609e1a 100644 --- a/web/share/js/kvm/main.js +++ b/web/share/js/kvm/main.js @@ -36,7 +36,9 @@ export function main() { if (value) { window.onbeforeunload = function(event) { let text = "Are you sure you want to close PiKVM session?"; - event.returnValue = text; + if (event) { + event.returnValue = text; + } return text; }; } else { |