diff --git a/static/js/entitiesDialog.js b/static/js/entitiesDialog.js index d40ba6701..79160d8af 100644 --- a/static/js/entitiesDialog.js +++ b/static/js/entitiesDialog.js @@ -297,7 +297,9 @@ pandora.ui.entitiesDialog = function(options) { } function renderEntity() { - var id = ui.entitiesSelection['type'][0]; + var id = ui.entitiesSelection['type'] + ? ui.entitiesSelection['type'][0] + : null; if (!id) { $entity.empty(); return; @@ -315,7 +317,9 @@ pandora.ui.entitiesDialog = function(options) { } function renderForm() { - var id = ui.entitiesSelection['type'][0]; + var id = ui.entitiesSelection['type'] + ? ui.entitiesSelection['type'][0] + : null; if (!id) { $form.empty(); return;