MOBILE-4187 app: Replace all dots in url classname
parent
ae451c9673
commit
40972e8b79
|
@ -291,7 +291,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
let className = parsedUrl.domain?.replace('.', '-') || '';
|
let className = parsedUrl.domain?.replace(/\./g, '-') || '';
|
||||||
|
|
||||||
if (parsedUrl.port) {
|
if (parsedUrl.port) {
|
||||||
className += `--${parsedUrl.port}`;
|
className += `--${parsedUrl.port}`;
|
||||||
|
@ -301,7 +301,7 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||||
const trailing = new RegExp('/+$');
|
const trailing = new RegExp('/+$');
|
||||||
const path = parsedUrl.path.replace(leading, '').replace(trailing, '');
|
const path = parsedUrl.path.replace(leading, '').replace(trailing, '');
|
||||||
if (path) {
|
if (path) {
|
||||||
className += '--' + path.replace('/', '-');
|
className += '--' + path.replace(/\//g, '-') || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue