From 5822f0f034ff64d7581e3da24f35ab51c2098d6d Mon Sep 17 00:00:00 2001 From: rooot Date: Wed, 25 Feb 2026 23:02:29 +0100 Subject: [PATCH] fix: rare? crash with mxid coloring still not sure why str is undefined sometimes, but im honestly too lazy to debug this further Signed-off-by: rooot --- src/util/colorMXID.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/colorMXID.js b/src/util/colorMXID.js index ef7d6edc..221a9047 100644 --- a/src/util/colorMXID.js +++ b/src/util/colorMXID.js @@ -4,7 +4,7 @@ function hashCode(str) { let hash = 0; let i; let chr; - if (str.length === 0) { + if (str == undefined || str.length === 0) { return hash; } for (i = 0; i < str.length; i += 1) {