MOBILE-4187 app: Replace all dots in url classname

main
Pau Ferrer Ocaña 2023-04-18 12:24:02 +02:00
parent ae451c9673
commit 40972e8b79
1 changed files with 2 additions and 2 deletions

View File

@ -291,7 +291,7 @@ export class AppComponent implements OnInit, AfterViewInit {
return '';
}
let className = parsedUrl.domain?.replace('.', '-') || '';
let className = parsedUrl.domain?.replace(/\./g, '-') || '';
if (parsedUrl.port) {
className += `--${parsedUrl.port}`;
@ -301,7 +301,7 @@ export class AppComponent implements OnInit, AfterViewInit {
const trailing = new RegExp('/+$');
const path = parsedUrl.path.replace(leading, '').replace(trailing, '');
if (path) {
className += '--' + path.replace('/', '-');
className += '--' + path.replace(/\//g, '-') || '';
}
}