Dont return an array from linkify if the result is just a single node

This commit is contained in:
Ken-Håvard Lieng 2017-05-21 11:04:06 +02:00
parent 8684e2dea2
commit d96cf68d95

View File

@ -51,8 +51,8 @@ export default function linkify(text) {
}
}
if (result.length === 1 && typeof result[0] === 'string') {
return text;
if (result.length === 1) {
return result[0];
}
return result;