Fix selectize initialization in the Details page

Fixes: #462
This commit is contained in:
Pēteris Caune 2020-12-26 14:51:30 +02:00
parent 823b3dbc7b
commit c3b6d40012
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2

View File

@ -11,7 +11,9 @@ $(function () {
return {value: tag} 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) : []; var options = allTags ? allTags.split(" ").map(toOption) : [];
$("#update-tags-input").selectize({ $("#update-tags-input").selectize({
create: true, create: true,