Skip to content

Commit

Permalink
fix(cdk-experimental/scrolling): throw error rather than string (#26736)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7043a51)
  • Loading branch information
RuoJia123 authored and mmalerba committed Mar 7, 2023
1 parent ec824f1 commit e1c8fe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy {
*/
updateBufferSize(minBufferPx: number, maxBufferPx: number) {
if (maxBufferPx < minBufferPx) {
throw 'CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx';
throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');
}
this._minBufferPx = minBufferPx;
this._maxBufferPx = maxBufferPx;
Expand Down

0 comments on commit e1c8fe8

Please sign in to comment.