Fix double slicing

This commit is contained in:
Kevin Kandlbinder 2022-09-12 02:04:42 +02:00 committed by GitHub
parent 07918b406f
commit 4a6715be21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,6 @@ export class Link {
if (!linkStr.startsWith("#/")) { if (!linkStr.startsWith("#/")) {
return null; return null;
} }
linkStr = linkStr.slice(2);
const linkStrMatrixUrl = fragment.substr(2).startsWith("matrix:") ? fragment.substr(2) : "matrix:"+fragment.substr(2); const linkStrMatrixUrl = fragment.substr(2).startsWith("matrix:") ? fragment.substr(2) : "matrix:"+fragment.substr(2);
@ -135,7 +134,7 @@ export class Link {
return link; return link;
} catch(e) {} // The fragment was no matrix-URL. } catch(e) {} // The fragment was no matrix-URL.
linkStr = linkStr.substr(2); linkStr = linkStr.slice(2);
const [identifier, eventId] = linkStr.split("/"); const [identifier, eventId] = linkStr.split("/");