Fix soft-crash on bad permalinks
Fixes https://github.com/vector-im/riot-web/issues/12880pull/21833/head
parent
44ce5b5764
commit
9c20bf22ce
|
@ -200,6 +200,7 @@ matrixLinkify.options = {
|
|||
switch (type) {
|
||||
case "url": {
|
||||
// intercept local permalinks to users and show them like userids (in userinfo of current room)
|
||||
try {
|
||||
const permalink = parsePermalink(href);
|
||||
if (permalink && permalink.userId) {
|
||||
return {
|
||||
|
@ -208,6 +209,9 @@ matrixLinkify.options = {
|
|||
},
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
// OK fine, it's not actually a permalink
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "userid":
|
||||
|
|
Loading…
Reference in New Issue