diff --git a/web/templates/inline_decorated_stream_name.hbs b/web/templates/inline_decorated_stream_name.hbs index 32b687d79e..561049e95e 100644 --- a/web/templates/inline_decorated_stream_name.hbs +++ b/web/templates/inline_decorated_stream_name.hbs @@ -1,8 +1,8 @@ {{! This controls whether the swatch next to streams in the left sidebar has a lock icon. }} -{{#if stream.invite_only }} +{{~#if stream.invite_only ~}} {{stream.name ~}} -{{ else if stream.is_web_public }} +{{~ else if stream.is_web_public ~}} {{stream.name ~}} -{{ else }} +{{~ else ~}} {{stream.name ~}} -{{/if}} +{{~/if~}} diff --git a/web/templates/typeahead_list_item.hbs b/web/templates/typeahead_list_item.hbs index 69ca83601c..a074a64b38 100644 --- a/web/templates/typeahead_list_item.hbs +++ b/web/templates/typeahead_list_item.hbs @@ -19,11 +19,11 @@ {{!-- Separate container to ensure overflowing text remains in this container. --}}
- {{~#if stream}} - {{> inline_decorated_stream_name stream=stream }} - {{else}} + {{~#if stream~}} + {{~> inline_decorated_stream_name stream=stream ~}} + {{~else~}} {{~ primary ~}} - {{/if}} + {{~/if~}} {{~#if has_pronouns}} ({{pronouns}}) diff --git a/web/tests/composebox_typeahead.test.js b/web/tests/composebox_typeahead.test.js index 8542d8332d..c3ac41bc6c 100644 --- a/web/tests/composebox_typeahead.test.js +++ b/web/tests/composebox_typeahead.test.js @@ -896,7 +896,7 @@ test("initialize", ({override, override_rewire, mock_template}) => { actual_value = options.highlighter_html("kronor"); expected_value = '
\n' + - ' kronor
\n'; + ' kronor
\n'; assert.equal(actual_value, expected_value); // Highlighted content should be escaped. @@ -904,14 +904,14 @@ test("initialize", ({override, override_rewire, mock_template}) => { actual_value = options.highlighter_html("<&>"); expected_value = '
\n' + - ' <&>
\n'; + ' <&>\n'; assert.equal(actual_value, expected_value); options.query = "even m"; actual_value = options.highlighter_html("even more ice"); expected_value = '
\n' + - ' even more ice
\n'; + ' even more ice\n'; assert.equal(actual_value, expected_value); // options.sorter() @@ -1136,7 +1136,7 @@ test("initialize", ({override, override_rewire, mock_template}) => { ` \n` + ` \n` + '
\n' + - ' Othello, the Moor of Venice othello@zulip.com\n' + + ' Othello, the Moor of Venice othello@zulip.com\n' + "
\n"; assert.equal(actual_value, expected_value); // Reset the email such that this does not affect further tests. @@ -1148,7 +1148,7 @@ test("initialize", ({override, override_rewire, mock_template}) => { expected_value = ' \n' + '
\n' + - ' hamletcharacters Characters of Hamlet\n' + + ' hamletcharacters Characters of Hamlet\n' + "
\n"; assert.equal(actual_value, expected_value);