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); } } }