diff --git a/lib/client/listeners.js b/lib/client/listeners.js index fb0fe1e5..3a374897 100644 --- a/lib/client/listeners.js +++ b/lib/client/listeners.js @@ -317,17 +317,17 @@ var Util, DOM, CloudFunc, CloudCmd; function pop() { Events.add('popstate', function(event) { - var path = event.state; + var path = event.state || ''; path = path.replace(CloudFunc.FS, ''); - if (path) + if (!path) + CloudCmd.route(location.hash); + else CloudCmd.loadDir({ path : path, history : false }); - else - CloudCmd.route(location.hash); }); }