Skip to content

Commit 25527a0

Browse files
committed
try-catch JS blocks to work around errors
these selectors fail if the menu items aren't on the page but we don't care
1 parent a26edae commit 25527a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conduct/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ <h4>{{ item.name }}</h4>
138138
{% else %}
139139
{%- comment %} remove Emergency menu link because we don't have the info yet
140140
NOTE: jQuery not available on the page yet. {% endcomment -%}
141-
<script>document.querySelector('ul.secondarynav a[href="#emergency"]').parentElement.remove()</script>
141+
<script>try { document.querySelector('ul.secondarynav a[href="#emergency"]').parentElement.remove() } catch(e) {}</script>
142142
{% endif %}
143143

144144
<div class="row">
@@ -272,7 +272,7 @@ <h3>Online</h3>
272272
{% else %}
273273
{%- comment %} remove CSV Schedule menu link because we don't have the info yet
274274
NOTE: jQuery not available on the page yet. {% endcomment -%}
275-
<script>document.querySelector('ul.secondarynav a[href="#schedule"]').parentElement.remove()</script>
275+
<script>try { document.querySelector('ul.secondarynav a[href="#schedule"]').parentElement.remove() } catch(e) {}</script>
276276
{% endif %}
277277

278278
{% if site.data.conf.online-only-conference == false %}

0 commit comments

Comments
 (0)