From 7a10d8329b6d2c1495a55e7556ecd3e2b75546c3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 3 May 2024 13:54:12 -0700 Subject: [PATCH] message_store: Fix get_cached_message type. Signed-off-by: Anders Kaseorg --- web/src/message_store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/message_store.ts b/web/src/message_store.ts index c4a0858518..03b60ab812 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);