Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_list_tooltips: Avoid showing `undefined`.
Kislay Verma28a277027b0e
diff --git a/web/src/message_list_tooltips.ts b/web/src/message_list_tooltips.tsindex b57b932f5f7..457c98fa02b 100644--- a/web/src/message_list_tooltips.ts+++ b/web/src/message_list_tooltips.ts@@ -232,9 +232,14 @@ export function initialize(): void {if (tippy_content !== undefined) {instance.setContent(tippy_content);} else {- const $template = $(`#${CSS.escape($elem.attr("data-tooltip-template-id")!)}`);+ const template_id = $elem.attr("data-tooltip-template-id");+ if (template_id === undefined) {+ return false;+ }+ const $template = $(`#${CSS.escape(template_id)}`);instance.setContent(parse_html($template.html()));}+ return undefined;},onHidden(instance) {instance.destroy();