You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Fix function to consistently return boolean
This commit is contained in:
@ -157,7 +157,7 @@ module.exports = React.createClass({
|
|||||||
// TODO: make this configurable?
|
// TODO: make this configurable?
|
||||||
if (node.textContent.indexOf("/") > -1)
|
if (node.textContent.indexOf("/") > -1)
|
||||||
{
|
{
|
||||||
return node;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var url = node.getAttribute("href");
|
var url = node.getAttribute("href");
|
||||||
@ -170,11 +170,11 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
if (node.textContent.toLowerCase().trim().startsWith(host.toLowerCase())) {
|
if (node.textContent.toLowerCase().trim().startsWith(host.toLowerCase())) {
|
||||||
// it's a "foo.pl" style link
|
// it's a "foo.pl" style link
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// it's a [foo bar](http://foo.com) style link
|
// it's a [foo bar](http://foo.com) style link
|
||||||
return node;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user