Bug 1245649: Enable no-nested-ternary. r=mconley

This commit is contained in:
Dave Townsend
2016-02-03 21:17:16 -08:00
parent 90d6041298
commit 141eaedde7
29 changed files with 215 additions and 106 deletions

View File

@@ -426,9 +426,12 @@ var gGestureSupport = {
try {
// Determine what type of data to load based on default value's type
let type = typeof aDef;
let getFunc = "get" + (type == "boolean" ? "Bool" :
type == "number" ? "Int" : "Char") + "Pref";
return gPrefService[getFunc](branch + aPref);
let getFunc = "Char";
if (type == "boolean")
getFunc = "Bool";
else if (type == "number")
getFunc = "Int";
return gPrefService["get" + getFunc + "Pref"](branch + aPref);
}
catch (e) {
return aDef;