From fdf74c528f6a0cf1abc8401d0c8d96281fbc2c55 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 28 Jan 2026 15:21:31 +0800 Subject: [PATCH] bugfix --- bricks/bricks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bricks/bricks.js b/bricks/bricks.js index 157081c..43223e8 100644 --- a/bricks/bricks.js +++ b/bricks/bricks.js @@ -500,6 +500,7 @@ bricks.getWidgetById = function(idset, from_widget){ }; var get_by_typename=function(typename, fromw, downward){ if (! fromw) { + console.log('get_by_typename() return null,', typename, fromw, downward) return null; } if (downward) { @@ -508,13 +509,15 @@ bricks.getWidgetById = function(idset, from_widget){ var sc = get_by_typename(typename, c, downward); if (sc) return sc; } + console.log('get_by_typename() return null,', typename, fromw, downward) return null; } var p = fromw.parent; if (! p) { + console.log('get_by_typename() return null,', typename, fromw, downward) return null; } - if bricks.Factory.isWidgetType(p, typename)) return p; + if (bricks.Factory.isWidgetType(p, typename)) return p; return get_by_typename(p, typename, downward); }; if (!idset) return from_widget;