Fix function to consistently return boolean
This commit is contained in:
parent
2bb7aec0de
commit
5c2c01d414
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue