1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-22 09:12:19 -05:00

Add disconnect on logout

This commit is contained in:
Lance Stout 2013-09-17 11:19:37 -07:00
parent b5b32f3958
commit 4849929f83

View File

@ -1,4 +1,4 @@
/*global app, me*/
/*global app, me, client*/
"use strict";
var Backbone = require('backbone');
@ -41,6 +41,9 @@ module.exports = Backbone.Router.extend({
}
},
logout: function () {
if (client.sessionStarted) {
client.disconnect();
}
localStorage.clear();
window.location = '/login';
}