From c3b6d4001275e2b50247c8ff0101cf96bdbaf1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Sat, 26 Dec 2020 14:51:30 +0200 Subject: [PATCH] Fix selectize initialization in the Details page Fixes: #462 --- static/js/details.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/details.js b/static/js/details.js index 5a01d795..ae87a06f 100644 --- a/static/js/details.js +++ b/static/js/details.js @@ -11,7 +11,9 @@ $(function () { return {value: tag} } - var allTags = $("#update-tags-input").data("all-tags"); + // Use attr() instead of data() here, as data() converts attribute's string value + // to a JS object, but we need an unconverted string: + var allTags = $("#update-tags-input").attr("data-all-tags"); var options = allTags ? allTags.split(" ").map(toOption) : []; $("#update-tags-input").selectize({ create: true,