attempting to access const before decleration

This commit is contained in:
Westly Wright 2021-03-30 13:52:32 -07:00
parent 5375998684
commit a27ac8ae01
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
1 changed files with 2 additions and 3 deletions

View File

@ -269,14 +269,13 @@ export default Controller.extend({
return false;
}
const current = `${ window.location.origin }${ window.location.pathname }` ;
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;
}