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 <[email protected]>
This commit is contained in:
rooot committed 2026-02-25 23:02:29 +01:00
1 parent 43cb5313be
commit 5822f0f034
1 file changed
+1 -1
+1 -1
View File
@@ -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) {