From 6059a29660217fc987c2e08b26c197abb75646cd Mon Sep 17 00:00:00 2001 From: devlikepro Date: Mon, 24 Mar 2025 11:59:23 +0700 Subject: [PATCH] [core] fix message reactions empty for channels preview --- src/helpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/helpers.ts b/src/helpers.ts index 4effafe4..dfaee976 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -31,6 +31,9 @@ function splitAt(str: string, index) { } export function sortObjectByValues(obj: any) { + if (!obj) { + return obj; + } return Object.fromEntries( // @ts-ignore Object.entries(obj).sort(([, v1], [, v2]) => v2 - v1),