Skip to content

Commit

Permalink
refix for B50-3025674.zul (to TS issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChu committed Sep 28, 2023
1 parent 2057f7d commit b51aa98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion zul/src/main/resources/web/js/zul/mesh/ColumnMenuWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ export abstract class ColumnMenuWidget extends zul.mesh.HeadWidget {
override onChildAdded_(child: zul.mesh.HeaderWidget): void {
super.onChildAdded_(child);
this._syncColMenu();
this.getMeshWidget()?._syncEmpty();
let mesh = this.getMeshWidget();
if (mesh && mesh._syncEmpty)
mesh._syncEmpty();
}

/** @internal */
Expand Down
6 changes: 3 additions & 3 deletions zul/src/main/resources/web/js/zul/mesh/HeaderWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ export abstract class HeaderWidget extends zul.LabelImageWidget<HTMLTableCellEle
* @internal
*/
fixFaker_(): void {
if (!(this.parent instanceof zul.mesh.Auxhead)) {
var n = this.$n_(),
index = zk(n).cellIndex(),
let n = this.$n();
if (!(this.parent instanceof zul.mesh.Auxhead) && n) {
let index = zk(n).cellIndex(),
owner = this.getMeshWidget()!;
for (var faker: HTMLElement | undefined, fs = HeaderWidget._faker, i = fs.length; i--;) {
type MethodName = `e${typeof fs[number]}`;
Expand Down

0 comments on commit b51aa98

Please sign in to comment.