Add missing event argument and curly bracket

This commit is contained in:
Samuel Mannehed 2016-08-25 16:49:02 +02:00
parent b9efece4a8
commit da17d0369d
1 changed files with 2 additions and 2 deletions

View File

@ -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
}
});