From ae5370dda2457b75b14cbc915323313dede513ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 8 Aug 2022 18:50:31 +0200 Subject: [PATCH] Browser: bugfix if a link has no href --- src/Browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Browser.js b/src/Browser.js index 4dc37a2f..d372426e 100644 --- a/src/Browser.js +++ b/src/Browser.js @@ -33,7 +33,7 @@ module.exports = class Browser extends EventEmitter { Array.from(links).forEach(link => { const href = link.getAttribute('href') - if (href.substr(0, this.id.length + 2) === '#' + this.id + '?') { + if (href && href.substr(0, this.id.length + 2) === '#' + this.id + '?') { link.onclick = () => { this.history.push(this.parameters)