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.

message_store: Fix get_cached_message type.

Anders Kaseorg7a10d8329b6d
diff --git a/web/src/message_store.ts b/web/src/message_store.ts
index c4a0858518e..03b60ab8123 100644
--- a/web/src/message_store.ts
+++ b/web/src/message_store.ts
@@ -149,7 +149,7 @@ export function update_message_cache(message: Message): void {
stored_messages.set(message.id, message);
}
-export function get_cached_message(message_id: number): Message {
+export function get_cached_message(message_id: number): Message | undefined {
// You should only call this from message_helper.
// Use the get() wrapper below for most other use cases.
return stored_messages.get(message_id);