From 898f73e15f6bd3abd7e7362cd02749821d4a250e Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 20 Nov 2014 20:31:41 +0000 Subject: [PATCH] handle fresh ui settings --- static/js/entitiesDialog.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/entitiesDialog.js b/static/js/entitiesDialog.js index d40ba670..79160d8a 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;