mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-12 01:08:39 +00:00
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:
parent
325db5513c
commit
b63d2262f8
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map
vendored
BIN
resources/dist/index.js.map
vendored
Binary file not shown.
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue