Skip to content

Commit f806d4b

Browse files
committed
Fix test
1 parent dd0b13d commit f806d4b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/directive/model/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ function setupModelWatcher(ctrl) {
11641164
modelValue !== ctrl.$modelValue &&
11651165
// checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator
11661166

1167-
(!!ctrl.$modelValue || !!modelValue)
1167+
(!Number.isNaN(ctrl.$modelValue) || !Number.isNaN(modelValue))
11681168
) {
11691169
ctrl.$$setModelValue(modelValue);
11701170
}

src/filters/limit-to.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function limitToFilter() {
3333
if (!isArrayLike(input)) return input;
3434

3535
begin =
36-
!begin || isNaN(/** @type {any} */ (begin))
36+
!begin || Number.isNaN(/** @type {any} */ (begin))
3737
? 0
3838
: parseInt(/** @type {string} */ (begin), 10);
3939
begin =

src/shared/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function equals(o1, o2) {
55

66
if (o1 === null || o2 === null) return false;
77

8-
if (isNaN(o1) && isNaN(o2)) return true; // NaN === NaN
8+
if (Number.isNaN(o1) && Number.isNaN(o2)) return true; // NaN === NaN
99
const t1 = typeof o1,
1010
t2 = typeof o2;
1111

0 commit comments

Comments
 (0)