Skip to content

Commit 8b259a6

Browse files
committed
unwrap condition
1 parent 1b88056 commit 8b259a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdk/coercion/number-property.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export function isNumberValue(value: any): boolean {
1818
// parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,
1919
// and other non-number values as NaN, where Number just uses 0) but it considers the string
2020
// '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)));
21+
return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));
2222
}

0 commit comments

Comments
 (0)