mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
fix(listeners) pop: event.state could be null
This commit is contained in:
parent
d2c0afccab
commit
c12cd62ce7
1 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue