diff --git a/app/assets/javascripts/iqvoc/entityselect.js.erb b/app/assets/javascripts/iqvoc/entityselect.js.erb index c22f0552f..ac11f63ab 100644 --- a/app/assets/javascripts/iqvoc/entityselect.js.erb +++ b/app/assets/javascripts/iqvoc/entityselect.js.erb @@ -26,7 +26,8 @@ var EntitySelector = function(node) { this.indicator.css("visibility", "hidden"); - var selection = $.map(this.el.data("entities"), function(entity, i) { + var selection = this.el.data("entities") || []; + selection = $.map(selection, function(entity, i) { return self.createEntity(entity); }); selection = $('