From 1075492d8be3f762057edf97ff7ba3c258806df3 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 13 Jan 2018 09:45:00 +0330 Subject: [PATCH] fix(module): default module options to empty object --- lib/core/module.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/core/module.js b/lib/core/module.js index 704afc2853..7dc6d904bd 100755 --- a/lib/core/module.js +++ b/lib/core/module.js @@ -131,6 +131,11 @@ module.exports = class ModuleContainer { this.requiredModules[key] = { src, options, handler } } + // Default module options to empty object + if (options === undefined) { + options = {} + } + return new Promise((resolve, reject) => { // Prepare callback const cb = err => {