Bug 1401249 - Fix getStringPref usage in clicktoplay-rollout. r=Gijs
getStringPref(.., undefined) actually returns null instead of undefined.
MozReview-Commit-ID: H7aSQGnH8rK
--- a/browser/extensions/clicktoplay-rollout/bootstrap.js
+++ b/browser/extensions/clicktoplay-rollout/bootstrap.js
@@ -66,16 +66,18 @@ function defineCohort() {
// intentionally missing from the list is STATE_ENABLED,
// which will keep cohort undefined.
break;
}
}
switch (cohort) {
case undefined:
+ case null:
+ case "":
case "test":
case "control":
case "excluded":
{
// If it's either test/control, the cohort might have changed
// if the desired sampling has been changed.
let testThreshold = TEST_THRESHOLD[updateChannel];
let userSample = getUserSample();