diff --git a/flaskinventory/templates/helpers/_tomselect.html b/flaskinventory/templates/helpers/_tomselect.html index a3a76e88..89e17e7b 100644 --- a/flaskinventory/templates/helpers/_tomselect.html +++ b/flaskinventory/templates/helpers/_tomselect.html @@ -426,9 +426,9 @@ {% endif %} {% if 'related_publications' in fields %} - - new TomSelect('#related_publications', {plugins: ['remove_button']}) - + if (document.querySelector('#related_publications')) { + new TomSelect('#related_publications', {plugins: ['remove_button']}) + } {% endif %} {% if 'tools_used' in fields %}