replace switch with if-else chain
This commit is contained in:
parent
3e6e86d073
commit
71f5c9791d
@ -55,17 +55,13 @@ export default function (whitelist, outputType = "global") {
|
||||
};
|
||||
|
||||
var tree;
|
||||
switch (outputType) {
|
||||
case "global":
|
||||
if (outputType === "global") {
|
||||
tree = buildGlobal(namespace, builder);
|
||||
break;
|
||||
case "umd":
|
||||
} else if (outputType === "umd") {
|
||||
tree = buildUmd(namespace, builder);
|
||||
break;
|
||||
case "var":
|
||||
} else if (outputType === "var") {
|
||||
tree = buildVar(namespace, builder);
|
||||
break;
|
||||
default:
|
||||
} else {
|
||||
throw new Error("Unsupported output type");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user