We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4f033c commit 9e14140Copy full SHA for 9e14140
src/cdk/coercion/number-property.ts
@@ -16,7 +16,7 @@ export type NumberInput = string | number | null | undefined;
16
export function coerceNumberProperty(value: any): number;
17
export function coerceNumberProperty<D>(value: any, fallback: D): number | D;
18
export function coerceNumberProperty(value: any, fallbackValue = 0) {
19
- return _isNumberValue(value) ? Number(value) : fallbackValue;
+ return _isNumberValue(value) ? Number(value) : arguments.length === 2 ? fallbackValue : 0;
20
}
21
22
/**
0 commit comments