Don't use ES6 Number.isNaN

Number.isNaN is a new function introduced in ECMAScript 6.
MediaWiki only requires ECMAScript 5 supports from browsers.
Notably, Opera 12 does not have Number.isNaN. Instead, use
the global isNaN function (which behaves the same except for
non-numeric inputs).

Change-Id: If436cd26b21ce0336dfbc37144f6226e7b948e5e
This commit is contained in:
Bartosz Dziewoński 2017-08-28 20:52:32 +02:00
parent 325db5513c
commit b63d2262f8
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View file

@ -83,7 +83,7 @@ export default function createUserSettings( storage ) {
count = parseInt( result, 10 );
// stored number is not a zero, override it to zero and store new value
if ( Number.isNaN( count ) ) {
if ( isNaN( count ) ) {
count = 0;
this.setPreviewCount( count );
}