Skip to content

Commit 51318b0

Browse files
committed
Assign the option if the value is defined
1 parent 6eac94b commit 51318b0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/options.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ const convertOptions = (args, attrs) => {
7272
if (destinationDir != null) {
7373
options.to_dir = destinationDir
7474
}
75-
options.template_dirs = templateDir
76-
options.template_engine = templateEngine
75+
if (templateDir) {
76+
options.template_dirs = templateDir
77+
}
78+
if (templateEngine) {
79+
options.template_engine = templateEngine
80+
}
7781
if (typeof outFile !== 'undefined') {
7882
if (outFile === '') {
7983
options.to_file = '-'

0 commit comments

Comments
 (0)