Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

util: Fix same_sender type signature to allow undefined messages.

evykassirer2f7746386416
diff --git a/web/src/util.ts b/web/src/util.ts
index 9c1b604fe4b..dad8fc366b2 100644
--- a/web/src/util.ts
+++ b/web/src/util.ts
@@ -94,7 +94,10 @@ export const same_recipient = function util_same_recipient(a?: Recipient, b?: Re
return false;
};
-export const same_sender = function util_same_sender(a: RawMessage, b: RawMessage): boolean {
+export const same_sender = function util_same_sender(
+ a: RawMessage | undefined,
+ b: RawMessage | undefined,
+): boolean {
return (
a !== undefined &&
b !== undefined &&