From e8f5e8da4fa00c29b42be1030dba8419901ae6f7 Mon Sep 17 00:00:00 2001 From: Daniil Fadeev Date: Thu, 23 Mar 2023 17:28:08 +0400 Subject: [PATCH] message_controls: Fix "undefined" tooltip content. --- web/src/tippyjs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/tippyjs.js b/web/src/tippyjs.js index 445d94794b..2bd2654b99 100644 --- a/web/src/tippyjs.js +++ b/web/src/tippyjs.js @@ -171,8 +171,10 @@ export function initialize() { onShow(instance) { // Handle dynamic "starred messages" and "edit" widgets. const $elem = $(instance.reference); + const tippy_content = $elem.attr("data-tippy-content"); const $template = $("#" + $elem.attr("data-tooltip-template-id")); - instance.setContent(parse_html($template.html())); + + instance.setContent(tippy_content ?? parse_html($template.html())); }, });