From 828debf69a2470ccb6cc53d7ff5a0f0251167e62 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Thu, 25 Aug 2016 16:49:02 +0200 Subject: [PATCH] Add missing event argument and curly bracket --- include/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ui.js b/include/ui.js index 058ae5a..0386363 100644 --- a/include/ui.js +++ b/include/ui.js @@ -158,12 +158,12 @@ var UI; // While connected we want to display a confirmation dialogue // if the user tries to leave the page - Util.addEvent(window, 'beforeunload', function () { + Util.addEvent(window, 'beforeunload', function (e) { if (UI.rfb && UI.rfb_state === 'normal') { var msg = "You are currently connected."; e.returnValue = msg; return msg; - else { + } else { return void 0; // To prevent the dialogue when disconnected } });