From 657a11de83ea31e36c4c96dadf62f5cebb00e752 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 25 Jul 2019 19:25:28 +0100 Subject: [PATCH] Fix /rainbowme and /rainbow breaking apart utf-16 emoji Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/utils/colour.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/colour.js b/src/utils/colour.js index 5d90bf0773..2ec904c0d3 100644 --- a/src/utils/colour.js +++ b/src/utils/colour.js @@ -56,7 +56,7 @@ export function hueToRGB(h, s, l) { export function textToHtmlRainbow(str) { const frequency = 360 / str.length; - return str.split("").map((c, i) => { + return Array.from(str).map((c, i) => { const [r, g, b] = hueToRGB(i * frequency, 1.0, 0.5); return '