Pārlūkot izejas kodu

HUE-5378 [assist] Don’t show the comment header in the context popover when there’s no comment

Johan Ahlen 9 gadi atpakaļ
vecāks
revīzija
4da1696

+ 2 - 2
desktop/core/src/desktop/templates/sql_context_popover.mako

@@ -193,7 +193,7 @@ from metadata.conf import has_navigator
         </span>
       </div>
       <!-- /ko -->
-      <!-- ko if: typeof comment !== 'undefined' && comment !== '' -->
+      <!-- ko if: typeof comment !== 'undefined' && comment !== '' && comment !== null -->
       <div style="margin: 10px; font-size: 15px; font-weight: 300;">${ _("Comment") }</div>
       <div style="margin-left: 15px; font-style: italic;" data-bind="text: comment"></div>
       <!-- /ko -->
@@ -209,7 +209,7 @@ from metadata.conf import has_navigator
     <div class="sql-context-flex-fill" data-bind="with: fetchedData, nicescroll">
       <div style="margin: 15px;">
         <a class="pointer" data-bind="text: name, attr: { title: name }, click: function() { huePubSub.publish('sql.context.popover.scroll.to.column', name); }"></a> (<span data-bind="text: type.indexOf('<') !== -1 ? type.substring(0, type.indexOf('<')) : type, attr: { title: type }"></span>)
-        <!-- ko if: typeof comment !== 'undefined' && comment !== '' -->
+        <!-- ko if: typeof comment !== 'undefined' && comment !== '' && comment !== null -->
         <div style="margin-top: 10px; font-size: 15px; font-weight: 300;">${ _("Comment") }</div>
         <div data-bind="text: comment"></div>
         <!-- /ko -->