From bc8e69d99f5b7b22fd1b781fa1862c24e0de0b90 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 18 Sep 2015 11:56:23 -0400 Subject: Fixed incorrect check if a url starts with an explicit protocol --- web/react/utils/text_formatting.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react') diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 2025e16da..54d010dbf 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -56,7 +56,7 @@ function autolinkUrls(text, tokens) { const linkText = match.getMatchedText(); let url = linkText; - if (!url.lastIndexOf('http', 0) === 0) { + if (url.lastIndexOf('http', 0) !== 0) { url = `http://${linkText}`; } -- cgit v1.2.3-1-g7c22