From be87c9831ca4261bcb455d717c32c720ad529888 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 14 May 2016 23:09:54 +0300 Subject: [PATCH] minor cleanup... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 6654f08b..eee392b6 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -381,7 +381,7 @@ module.makeUIDialog = function(a, b){ var args = [].slice.call(arguments) // see if the first arg is a container spec... - var container = this.uiContainers.indexOf(args[0]) >= 0 ? + var container = this.isUIContainer(args[0]) ? args.shift() : (dfl || this.config['ui-default-container'] || 'Overlay') @@ -454,13 +454,16 @@ var DialogsActions = actions.Actions({ // testers... isUIContainer: ['- Interface/', actions.doWithRootAction(function(action){ - return action.__container__ == true })], + return action != null + && action.__container__ == true })], isUIDialog: ['- Interface/', actions.doWithRootAction(function(action){ - return action.__dialog__ == true })], + return action != null + && action.__dialog__ == true })], isUIElement: ['- Interface/', actions.doWithRootAction(function(action){ - return action.__dialog__ == true || action.__container__ == true })], + return action != null + && (action.__dialog__ == true || action.__container__ == true) })], // container constructors...