diff --git a/web/src/reactions.ts b/web/src/reactions.ts index df3354f72d..19f7633b74 100644 --- a/web/src/reactions.ts +++ b/web/src/reactions.ts @@ -394,7 +394,7 @@ export let insert_new_reaction = ( message_reactions: [context], }, }; - const $msg_reaction_section = render_message_reactions(reaction_section_context); + const $msg_reaction_section = $(render_message_reactions(reaction_section_context)); $rows.find(".messagebox-content").append($msg_reaction_section); } else { const $new_reaction = $(render_message_reaction(context)); diff --git a/web/tests/reactions.test.cjs b/web/tests/reactions.test.cjs index b1b4b47ac5..528b94b585 100644 --- a/web/tests/reactions.test.cjs +++ b/web/tests/reactions.test.cjs @@ -890,8 +890,8 @@ test("insert_new_reaction (first reaction)", ({mock_template, override_rewire}) $rows.set_find_results(".messagebox-content", $messagebox_content); let append_called = false; - $messagebox_content.append = (element) => { - assert.equal(element, ""); + $messagebox_content.append = ($element) => { + assert.equal($element.selector, ""); append_called = true; };