mirror of https://github.com/OpenVidu/openvidu.git
ov-components: Avoid null pointer
parent
3f1334b65d
commit
52564b5f5d
|
@ -366,7 +366,12 @@ export class OpenViduComponentsConfigService {
|
||||||
* @returns The base href of the application as a string.
|
* @returns The base href of the application as a string.
|
||||||
*/
|
*/
|
||||||
getBaseHref(): string {
|
getBaseHref(): string {
|
||||||
const baseHref = this.document.getElementsByTagName('base')[0].href;
|
const base = this.document.getElementsByTagName('base');
|
||||||
|
if (!base || base.length === 0) {
|
||||||
|
return '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
const baseHref = base[0].href;
|
||||||
if (baseHref) {
|
if (baseHref) {
|
||||||
return baseHref;
|
return baseHref;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue