From ca0f6320afe5c97b2d72ae6840835a5550fcb2b2 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 14 Mar 2024 21:49:48 +0800 Subject: [PATCH] bugfix --- bricks/dynamicaccordion.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bricks/dynamicaccordion.js b/bricks/dynamicaccordion.js index 1dd65bf..90ab37c 100644 --- a/bricks/dynamicaccordion.js +++ b/bricks/dynamicaccordion.js @@ -86,7 +86,7 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel { return; } var w; - var tb; + var tb = null; var info = new bricks.AccordionInfo({}); info.data = record; item.add_widget(info); @@ -101,8 +101,10 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel { } } w = await bricks.widgetBuild(this.record_view, info, record); - w.add_widget(tb, 0); if (w){ + if (tb){ + w.add_widget(tb, 0); + } info.add_widget(w); } else { bricks.debug('bricks.widgetBuild(), tmpl=', this.record_view, 'record=', record);