title: Code block working in mozilla firefox but not in Chrome
body: <p>Does anyone have any idea why this code block might work well in Mozilla Perfectly and not at all in Chrome? This code block is generating and presenting perfectly in Mozilla Firefox, but not at all in the Chrome search engine. This started when I placed some new code into the block starting at the x = -1 variable and below.</p>
  <pre><code>function displaySideBarLink( title, sectionname, anchorid) {
  
      let sidebar;
  
      if ($) {
          sidebar = $('#page-layout #record-sidebar .w3-container.menu-links');
      }
  
      if (sidebar) {
          // Create a link in the side bar navigation
          let sidebar_link = document.createElement(&quot;a&quot;);
  
  
          let section_title = title || sectionname;
          if (section_title) {
              sidebar_link.id = sectionname + &quot;-sidebar&quot;;
              sidebar_link.className = &quot;w3-bar-item&quot;;
              sidebar_link.href = '#' + anchorid;
  
              sidebar_link.title = section_title;
              sidebar_link.alt = section_title;
              sidebar_link.innerText = section_title;
  
  
              sidebar.append(sidebar_link);
          }
  
      }
  
      x = -1
      lastName = &quot;&quot;
      $(&quot;#panels-region .panel-heading&quot;).each(function () {
          x++
          console.log($(this))
          curName = $(this).attr(&quot;name&quot;)
          $('&lt;a id=&quot;panels-sidebar-' + curName.replace(/ |\//g, &quot;_&quot;) + '&quot; class=&quot;w3-bar-item&quot; href=&quot;#panel-' + x + '-header&quot; title=&quot;' + curName.replace(/ |\//g, &quot;_&quot;) + '&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' + curName + '&lt;/a&gt;').insertAfter(&quot;#panels-sidebar&quot; + lastName.replace(/ |\//g, &quot;_&quot;))
          console.log($(this).attr(&quot;name&quot;), lastName)
          lastName = &quot;-&quot; + curName
      })
      lastName = &quot;&quot;
      $(&quot;#graph-region .panel-heading h4&quot;).each(function () {
          try {
              x++
              console.log($(this).text())
              curName = $(this).text().replace(&quot;Collapse panelExpand panel&quot;, &quot;&quot;)
              $('&lt;a id=&quot;tree_viewers-sidebar-' + curName.replace(/ |\//g, &quot;_&quot;) + '&quot; class=&quot;w3-bar-item&quot; href=&quot;#panel-' + x + '-header&quot; title=&quot;' + curName.replace(/ |\//g, &quot;_&quot;) + '&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' + curName + '&lt;/a&gt;').insertAfter(&quot;#tree_viewers-sidebar&quot; + lastName.replace(/ |\//g, &quot;_&quot;))
              console.log($(this).attr(&quot;name&quot;), lastName)
              lastName = &quot;-&quot; + curName
          } catch (e) {
          }
      })
  
      $(&quot;.menu-links a&quot;).css(&quot;padding&quot;, &quot;0px 8px&quot;)
  
      $(&quot;.field-value&quot;).each(function () {
          $(this).html($(this).text())
      })
      $(&quot;#tables-content td&quot;).each(function () {
          $(this).html($(this).text())
      })
      $(&quot;.panel-body&quot;).css(&quot;background-color&quot;, &quot;white&quot;)
      $(&quot;#panels-region .panel-wrapper .panel-default&quot;).css(&quot;background-color&quot;, &quot;white&quot;)
  }
  </code></pre>