diff --git a/app/assets/javascripts/timelines_autocompleter.js b/app/assets/javascripts/timelines_autocompleter.js index 504c0e45ca..60de5a7eab 100644 --- a/app/assets/javascripts/timelines_autocompleter.js +++ b/app/assets/javascripts/timelines_autocompleter.js @@ -51,7 +51,10 @@ this.opts.ajax.url = this.element.attr("data-ajaxURL"); } if (!($(this.element).attr("data-values") === "" || $(this.element).attr("data-values") === null || $(this.element).attr("data-values") === undefined)) { - this.opts.data.results = JSON.parse($(this.element).attr('data-values')); + this.opts.data.results = JSON.parse($(this.element).attr('data-values')).map(function (e) { + e.text = e.text || e.name; + return e; + }); delete this.opts.ajax; } },