From d3fdc285636d4521c6e7e16ed4da0c7d71a1ab70 Mon Sep 17 00:00:00 2001 From: verketh <34436803+verketh@users.noreply.github.com> Date: Sat, 29 Apr 2023 23:26:41 +0800 Subject: [PATCH] Update HTMLElement.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix:br标签空值问题 --- src/layaAir/laya/html/dom/HTMLElement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layaAir/laya/html/dom/HTMLElement.ts b/src/layaAir/laya/html/dom/HTMLElement.ts index bcd7ee2993..9b9932bb55 100644 --- a/src/layaAir/laya/html/dom/HTMLElement.ts +++ b/src/layaAir/laya/html/dom/HTMLElement.ts @@ -117,7 +117,7 @@ export class HTMLElement { if (this._children) this._children.forEach(function (o: HTMLElement, index: number, array: any[]): void { var _style: HTMLStyle = (o._style); - _style._enableLayout && _style._enableLayout() && o._addToLayout(out); + _style && _style._enableLayout && _style._enableLayout() && o._addToLayout(out); }); return true; }