fix(module): always fill requiredModules

This commit is contained in:
Pooya Parsa 2018-01-11 17:02:31 +03:30
parent e5ffbdfcd2
commit 83236d82ce

View File

@ -134,10 +134,9 @@ module.exports = class ModuleContainer {
// Resolve module meta
const key = (handler.meta && handler.meta.name) || handler.name || src
// Check requireOnce if possbile
if (requireOnce && typeof key === 'string') {
const alreadyRequired = this.requiredModules[key]
if (alreadyRequired) {
// Update requiredModules
if (typeof key === 'string') {
if (requireOnce && this.requiredModules[key]) {
return
}
this.requiredModules[key] = { src, options, handler }