Fix function to consistently return boolean

This commit is contained in:
David Baker 2016-11-07 11:45:55 +00:00
parent 2bb7aec0de
commit 5c2c01d414

View file

@ -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;
}
}
},