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 1b88056 commit 8b259a6Copy full SHA for 8b259a6
src/cdk/coercion/number-property.ts
@@ -18,5 +18,5 @@ export function isNumberValue(value: any): boolean {
18
// parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,
19
// and other non-number values as NaN, where Number just uses 0) but it considers the string
20
// '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.
21
- return !(isNaN(parseFloat(value as any)) || isNaN(Number(value)));
+ return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));
22
}
0 commit comments