From 07918b406fdc4fc5799f4332113dce1915d224b6 Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Mon, 12 Sep 2022 02:03:15 +0200 Subject: [PATCH] Update Link.js --- src/Link.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Link.js b/src/Link.js index 623e269..80a4925 100644 --- a/src/Link.js +++ b/src/Link.js @@ -111,7 +111,7 @@ export class Link { if (!linkStr.startsWith("#/")) { return null; } - linkStr = linkStr.substr(2); + linkStr = linkStr.slice(2); const linkStrMatrixUrl = fragment.substr(2).startsWith("matrix:") ? fragment.substr(2) : "matrix:"+fragment.substr(2); @@ -134,6 +134,8 @@ export class Link { return link; } catch(e) {} // The fragment was no matrix-URL. + + linkStr = linkStr.substr(2); const [identifier, eventId] = linkStr.split("/");