mirror of https://github.com/rancher/ui.git
attempting to access const before decleration
This commit is contained in:
parent
5375998684
commit
a27ac8ae01
|
|
@ -270,13 +270,12 @@ export default Controller.extend({
|
|||
}
|
||||
|
||||
const current = `${ window.location.origin }${ window.location.pathname }`;
|
||||
const rootUrl = current.substr(0, current.length - 6);
|
||||
|
||||
if ( current === redirect || `${ rootUrl }/` === redirect ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const rootUrl = current.substr(0, current.length - 6);
|
||||
|
||||
if ( redirect.startsWith(rootUrl) && redirect !== rootUrl && redirect !== `${ rootUrl }/` ) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue