wrap non-arrays/strings/falsys in an array in util.list - fixes babel/babelify#69

This commit is contained in:
Sebastian McKenzie
2015-04-04 02:40:09 +11:00
parent b7a08100a6
commit c715d96e46
2 changed files with 7 additions and 1 deletions

View File

@@ -59,8 +59,10 @@ export function list(val: string): Array<string> {
return [];
} else if (Array.isArray(val)) {
return val;
} else {
} else if (typeof val === "string") {
return val.split(",");
} else {
return [val];
}
}