Skip to content

Commit

Permalink
check the type if is an array load it as it is.
Browse files Browse the repository at this point in the history
  • Loading branch information
merighifacundo committed Jun 30, 2021
1 parent 79f00a3 commit f0ad6d0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/app.js
Expand Up @@ -87,7 +87,14 @@ class Mali extends Emitter {
if (typeof path === 'object' && path.root && path.file) {
protoFilePath = path.file
if (!loadOptions.includeDirs) {
loadOptions.includeDirs = [path.root]
/**
* To support multiple folders to feed the protoLoader.
*/
if (path.root instanceof Array) {
loadOptions.includeDirs = path.root
} else {
loadOptions.includeDirs = [path.root]
}
}
}

Expand Down

0 comments on commit f0ad6d0

Please sign in to comment.