forked from 0x2620/pandora
fix URL controller
This commit is contained in:
parent
1a83a8ff28
commit
cf2b9134f5
1 changed files with 3 additions and 3 deletions
|
@ -369,7 +369,9 @@ pandora.URL = (function() {
|
||||||
// on page load, this sets the state from the URL
|
// on page load, this sets the state from the URL
|
||||||
// can also be used to parse a URL
|
// can also be used to parse a URL
|
||||||
that.parse = function(url, callback) {
|
that.parse = function(url, callback) {
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 2) {
|
||||||
|
self.URL.parse(url, callback);
|
||||||
|
} else {
|
||||||
callback = arguments[0];
|
callback = arguments[0];
|
||||||
url = null;
|
url = null;
|
||||||
if (document.location.pathname.slice(0, 4) == 'url=') {
|
if (document.location.pathname.slice(0, 4) == 'url=') {
|
||||||
|
@ -380,8 +382,6 @@ pandora.URL = (function() {
|
||||||
setState(state, callback);
|
setState(state, callback);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
self.URL.parse(url, callback);
|
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue