1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2025-01-11 05:38:01 -05:00

Only confirm leaving if a session was started.

This commit is contained in:
Lance Stout 2013-09-17 10:43:14 -07:00
parent f122a8f446
commit e44d956c42

View File

@ -32,8 +32,10 @@ module.exports = {
me.hasFocus = true;
});
window.onbeforeunload = function () {
client.disconnect();
return "End active session?";
if (client.sessionStarted) {
client.disconnect();
return "End active session?";
}
};
config = JSON.parse(config);