From f54f92402c7daf118e168d72f4aa53015d1a2819 Mon Sep 17 00:00:00 2001 From: Sam Smith Date: Wed, 1 Mar 2017 10:36:59 +0000 Subject: [PATCH] storage: Fix UserSettings#hasIsEnabled mw.storage#get doesn't take a default value to return if the underlying storage is disabled or the key is missing. In the former case it'll return false and in the latter it'll return null, i.e. in neither case will it return undefined. Bug: T157700 Change-Id: I3f653c11468e17b64765e85ebb3b8f03e311352a --- resources/dist/index.js | Bin 122213 -> 122234 bytes resources/dist/index.js.map | Bin 154029 -> 154059 bytes src/userSettings.js | 4 ++- tests/qunit/ext.popups/userSettings.test.js | 26 ++++++++++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/resources/dist/index.js b/resources/dist/index.js index b3f1e27de26531124ab539f3a2e9154c74d0d1e3..b4df3d24675395a1f60a1ff1c87af52c4939ebeb 100644 GIT binary patch delta 78 zcmaF5i~ZLw_6;W2xyurZ6v`5FN>deVCtF>Y(N@s3=Hley1cIW}lG36)1*iP{oYcfT c4X7$j1w~t1g|x(+;?(BC>)Q*jGk#$O07|PHlK=n! delta 63 zcmeyhi~Z>?_6;W2r^iV!vQMtKDlM&}P@0#LnwFWDnxdeoplEB0;7^`=ReZAi71riO M*S9aa&Uk|r04Zo0%>V!Z diff --git a/resources/dist/index.js.map b/resources/dist/index.js.map index e3003a3ea64ae994141084ca9ce793d1f7f344cc..c36b759b0331b5da8e96ba3fd069c7185359dd1a 100644 GIT binary patch delta 178 zcmZ3xne+5!&It}8i9nEMmYkMiVQ6MA`XMeJQCcK-3{a>Cm2Xg z=HcO=eA`rDQYhEt2L?V&8E%{P3>RBq)xY^^X2Ol>3(6T;*vk@gN>deVr+Ygw%IGO* zTF2x8VF?HprIwTy