From b63d2262f8d87b31208c7ec4d8c58582231825e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 28 Aug 2017 20:52:32 +0200 Subject: [PATCH] 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 --- resources/dist/index.js | Bin 36183 -> 36176 bytes resources/dist/index.js.map | Bin 306675 -> 306646 bytes src/userSettings.js | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/dist/index.js b/resources/dist/index.js index b620924a69aafd807d0e707f0ccb2cbe70d568ee..3c66fa61b895ffd2069921a79838806ae545298c 100644 GIT binary patch delta 14 WcmcaUi|N8FrVa19H-GI;Vgvv?y$7EF delta 22 ecmcaGi|P6-rVa19+5Jj$lTwTHHoxmmVgvwt>!jljRP78TfvP~voXHyw zNhoCp>qG)MI^jU!yi^@mAUoR^#B)s#1}bxP%bEP@kQ85GhLeu7qo<>eCs2W9v(Vvo zp~H;Zg$^?<5!=4^CetGxtgfA|@rr3jd-ijt?b*+nA0Gs%T+BFKKZMz6yVh!!lS}{* Cmr<<% delta 259 zcmcb1Tj=v`p$Q2hsmZB^hG~{5hUP{V7N$w&7M8||lOHllZS4D@%jQ>_o0M9#xmnM4 zGLOHbqocEqFObZLn0)NuG=5K=bSFn=N1b3t$56vur^y9T;_{Ww#ugr6AxG_8CmnaN z9(Rx`5HoM`!b1{DxxqS-K#op0P`Dsf#}&xV_66}=GlPN3T;1{}-##S8SDfLbe-#iuo$W2y9 diff --git a/src/userSettings.js b/src/userSettings.js index f63a0964d..244552eef 100644 --- a/src/userSettings.js +++ b/src/userSettings.js @@ -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 ); }