Add missing event argument and curly bracket

This commit is contained in:
Samuel Mannehed 2016-08-25 16:49:02 +02:00
parent 708509d691
commit 828debf69a

View File

@ -158,12 +158,12 @@ var UI;
// While connected we want to display a confirmation dialogue // While connected we want to display a confirmation dialogue
// if the user tries to leave the page // 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') { if (UI.rfb && UI.rfb_state === 'normal') {
var msg = "You are currently connected."; var msg = "You are currently connected.";
e.returnValue = msg; e.returnValue = msg;
return msg; return msg;
else { } else {
return void 0; // To prevent the dialogue when disconnected return void 0; // To prevent the dialogue when disconnected
} }
}); });