File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1- /** @internalapi @module vanilla */ /** */
1+ /** @internalapi @module vanilla */
2+ /** */
23import { isDefined , isUndefined } from '../common/predicates' ;
34import { LocationConfig } from '../common/coreservices' ;
45
@@ -42,8 +43,11 @@ export class BrowserLocationConfig implements LocationConfig {
4243
4344 private getBaseHref ( ) {
4445 const baseTag : HTMLBaseElement = document . getElementsByTagName ( 'base' ) [ 0 ] ;
45- if ( ! baseTag || ! baseTag . href ) return location . pathname || '/' ;
46- return baseTag . href . replace ( / ^ ( h t t p s ? : ) ? \/ \/ [ ^ / ] * / , '' ) ;
46+ if ( baseTag && baseTag . href ) {
47+ return baseTag . href . replace ( / ^ ( h t t p s ? : ) ? \/ \/ [ ^ / ] * / , '' ) ;
48+ }
49+
50+ return this . _isHtml5 ? '/' : location . pathname || '/' ;
4751 }
4852
4953 dispose ( ) { }
You can’t perform that action at this time.
0 commit comments