diff --git a/packages/babel-cli/bin/babel/index.js b/packages/babel-cli/bin/babel/index.js index 40d2ddd712..d26c2af9c9 100755 --- a/packages/babel-cli/bin/babel/index.js +++ b/packages/babel-cli/bin/babel/index.js @@ -51,7 +51,7 @@ commander.on("--help", function () { each(keys(obj).sort(), function (key) { if (key[0] === "_") return; - if (obj[key].metadata.optional) key = "[" + key + "]"; + if (obj[key].metadata && obj[key].metadata.optional) key = "[" + key + "]"; console.log(" - " + key); });