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
+ /** */
2
3
import { isDefined , isUndefined } from '../common/predicates' ;
3
4
import { LocationConfig } from '../common/coreservices' ;
4
5
@@ -42,8 +43,11 @@ export class BrowserLocationConfig implements LocationConfig {
42
43
43
44
private getBaseHref ( ) {
44
45
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 || '/' ;
47
51
}
48
52
49
53
dispose ( ) { }
You can’t perform that action at this time.
0 commit comments