Skip to content

Commit 405c141

Browse files
committed
dot notation for default
1 parent b1078b8 commit 405c141

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/convert-argv.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = function(optimist, argv, convertOptions) {
9595
}
9696

9797
var isES6DefaultExportedFunc = (
98-
typeof options === "object" && options !== null && typeof options["default"] === "function"
98+
typeof options === "object" && options !== null && typeof options.default === "function"
9999
);
100100

101101
if(typeof options === "function" || isES6DefaultExportedFunc) {
@@ -117,8 +117,8 @@ module.exports = function(optimist, argv, convertOptions) {
117117
}
118118

119119
// process ES6 default
120-
if(typeof options === "object" && typeof options["default"] === "object") {
121-
return processConfiguredOptions(options["default"]);
120+
if(typeof options === "object" && typeof options.default === "object") {
121+
return processConfiguredOptions(options.default);
122122
}
123123

124124
if(Array.isArray(options)) {

0 commit comments

Comments
 (0)