Skip to content

Commit e02c705

Browse files
pitrewjimthedev
authored andcommitted
Allow using ES6 modules with default export (#328)
1 parent 89b9a03 commit e02c705

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/commitizen/adapter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ function getPrompter(adapterPath) {
116116

117117
if(adapter && adapter.prompter && isFunction(adapter.prompter)) {
118118
return adapter.prompter;
119+
} else if (adapter && adapter.default && adapter.default.prompter && isFunction(adapter.default.prompter)) {
120+
return adapter.default.prompter;
119121
} else {
120122
throw "Could not find prompter method in the provided adapter module: " + adapterPath;
121123
}

0 commit comments

Comments
 (0)