dad13f95ddaaa0f9c9b111fdc6454b0a3053c1c0
chmalee
  Tue Oct 31 10:56:18 2023 -0700
Fix broken tables on hgc pages for tracks with the detailsDynamicTable setting, refs #32269,#32519

diff --git src/hg/js/hgc.js src/hg/js/hgc.js
index 1848282..211a1d3 100644
--- src/hg/js/hgc.js
+++ src/hg/js/hgc.js
@@ -262,31 +262,31 @@
                     trackName = "chainHprc" + input.getAttribute("data-trackName");
                     input.name = trackName;
                     input.value = input.value.toLowerCase();
                 }
             }
         });
     }
 }
 
 
 
 
 // on page load initialize VEP, Population Frequency and Haplotype Tables
 // for gnomAD v3.1.1 track
 $(document).ready(function() {
-    if (doHPRCTable) {
+    if (typeof doHPRCTable !== "undefined") {
         makeHPRCTable();
     }
     if ($("#svgTable") !== null) {
         // redraw the svg with appropriate widths for all columns
         // swatchWidth and columnSpacer are taken from svgBarChart() in hgc/barChartClick.c
         // they should probably be dynamically determined
         var swatchWidth = 20.0;
         var columnSpacer = 4.0;
         var maxSampleWidth = 0.0;
 
         // determine the size taken up by the sample names
         $(".sampleLabel").each(function(s) {
             if ((sampleLength = this.getComputedTextLength()) >= maxSampleWidth) {
                 maxSampleWidth = sampleLength;
             }