From cb341b86f9a85bf99a9f53dd4c78789c99b3d2e8 Mon Sep 17 00:00:00 2001 From: Mark Paniterce <73551111+mark7p@users.noreply.github.com> Date: Fri, 22 Nov 2024 21:05:42 +0800 Subject: [PATCH] fix lack of optional chaining (#16807) --- src/app/components/scroller/scroller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/scroller/scroller.ts b/src/app/components/scroller/scroller.ts index 0b18c2778ba..7241896072d 100644 --- a/src/app/components/scroller/scroller.ts +++ b/src/app/components/scroller/scroller.ts @@ -882,7 +882,7 @@ export class Scroller implements OnInit, AfterContentInit, AfterViewChecked, OnD setProp('height', numItems, this._itemSize[0]); setProp('width', this._columns?.length || this._items[1]?.length, this._itemSize[1]); } else { - this.horizontal ? setProp('width', this._columns.length || this._items.length, this._itemSize) : setProp('height', numItems, this._itemSize); + this.horizontal ? setProp('width', this._columns?.length || this._items.length, this._itemSize) : setProp('height', numItems, this._itemSize); } } }