diff --git a/web/src/echo.js b/web/src/echo.js index f8d1772926..0a8e0881c4 100644 --- a/web/src/echo.js +++ b/web/src/echo.js @@ -172,7 +172,7 @@ export function insert_local_message(message_request, local_id_float, insert_new message.local_id = local_id_float.toString(); message.locally_echoed = true; message.id = local_id_float; - if (message.topic === undefined) { + if (!message.topic) { message.topic_links = []; } else { message.topic_links = markdown.get_topic_links(message.topic); diff --git a/web/tests/compose.test.js b/web/tests/compose.test.js index 73c7cedc51..74d9867cd9 100644 --- a/web/tests/compose.test.js +++ b/web/tests/compose.test.js @@ -266,7 +266,6 @@ test_ui("send_message", ({override, override_rewire, mock_template}) => { const server_message_id = 127; override(markdown, "render", noop); - override(markdown, "get_topic_links", noop); override_rewire(echo, "try_deliver_locally", (message_request) => { const local_id_float = 123.04;