From f87dfed579c0dd69dfc923b25f37a9a07c500fbd Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 19 Dec 2020 16:14:07 +0100 Subject: [PATCH] Fixed URL emitting --- shared/js/text/chat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/js/text/chat.ts b/shared/js/text/chat.ts index 09fa189c..58bdb672 100644 --- a/shared/js/text/chat.ts +++ b/shared/js/text/chat.ts @@ -56,7 +56,7 @@ function bbcodeLinkUrls(message: string, ignore: { start: number, end: number }[ let colonIndex = urlPath.indexOf(":"); - if(colonIndex === -1 || colonIndex + 2 < urlPath.length || urlPath[colonIndex + 1] !== "/" || urlPath[colonIndex + 2] !== "/") { + if(colonIndex === -1 || colonIndex + 2 >= urlPath.length || urlPath[colonIndex + 1] !== "/" || urlPath[colonIndex + 2] !== "/") { bbcodeUrl = "[url=https://" + urlPath + "]" + urlPath + "[/url]"; } else { bbcodeUrl = "[url]" + urlPath + "[/url]";