From 4ff7880584e128a2da59e22060131d33315161bc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Jun 2024 14:05:13 +0200 Subject: [PATCH] href can be null --- .../app/shared/shared-plugin-pages/plugin-pages.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts b/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts index fb449b478..6948082e8 100644 --- a/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts +++ b/client/src/app/shared/shared-plugin-pages/plugin-pages.component.ts @@ -40,7 +40,7 @@ export class PluginPagesComponent implements OnDestroy, AfterViewInit { if (!a) return // Get the href attribute set by the dev, not the one calculated by JS to detect if it's a relative/external link - const href = a.getAttribute('href') + const href = a.getAttribute('href') || '' if (!a.target && href.startsWith('/')) { event.preventDefault()