From 36685732401897526ea3ae28e56ad1e21fccb6cf Mon Sep 17 00:00:00 2001 From: Paul Balluff Date: Mon, 11 Jul 2022 18:41:31 +0200 Subject: [PATCH] #150 better tom select --- flaskinventory/templates/helpers/_tomselect.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 %}