You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +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?
|
||||
if (node.textContent.indexOf("/") > -1)
|
||||
{
|
||||
return node;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
var url = node.getAttribute("href");
|
||||
@ -170,11 +170,11 @@ module.exports = React.createClass({
|
||||
|
||||
if (node.textContent.toLowerCase().trim().startsWith(host.toLowerCase())) {
|
||||
// it's a "foo.pl" style link
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
// it's a [foo bar](http://foo.com) style link
|
||||
return node;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user