refactor(listeners) pop

This commit is contained in:
coderaiser 2014-05-22 09:15:08 -04:00
parent 2baf29eadc
commit 65a48ca731

View file

@ -387,16 +387,14 @@ var Util, DOM, CloudCmd;
function pop() {
Events.add('popstate', function(event) {
var path;
var path = event.state;
if (!event.state)
CloudCmd.route(location.hash);
else {
path = event.state + '?json';
if (path)
CloudCmd.ajaxLoad(path, {
nohistory: true
});
}
else
CloudCmd.route(location.hash);
});
}