From ff8580f441e39f416f302d4e52ddbc1a52102383 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 16 Apr 2013 14:06:20 +0200 Subject: Builder: return null if no spec supplied - fix https://fedorahosted.org/freeipa/ticket/3235 --- install/ui/src/freeipa/facet.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'install/ui/src') diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js index bc306fae..899eca53 100644 --- a/install/ui/src/freeipa/facet.js +++ b/install/ui/src/freeipa/facet.js @@ -121,7 +121,7 @@ exp.facet = IPA.facet = function(spec, no_init) { that.disable_breadcrumb = spec.disable_breadcrumb; that.disable_facet_tabs = spec.disable_facet_tabs; - that.action_state = IPA.build(spec.state, {}, { $factory: exp.state }); + that.action_state = IPA.build(spec.state || {}, {}, { $factory: exp.state }); that.actions = exp.action_holder_builder.build({ actions: spec.actions }); that.header_actions = spec.header_actions; @@ -1728,7 +1728,7 @@ exp.action_holder = IPA.action_holder = function(spec) { var i, action, actions; that.facet = facet; - actions = exp.action_builder.build(spec.actions); + actions = exp.action_builder.build(spec.actions) || []; for (i=0; i