fix(module): default module options to empty object

This commit is contained in:
Pooya Parsa 2018-01-13 09:45:00 +03:30
parent c1f77a5252
commit 1075492d8b

View File

@ -131,6 +131,11 @@ module.exports = class ModuleContainer {
this.requiredModules[key] = { src, options, handler } this.requiredModules[key] = { src, options, handler }
} }
// Default module options to empty object
if (options === undefined) {
options = {}
}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// Prepare callback // Prepare callback
const cb = err => { const cb = err => {