mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
minor requireModule fix
This commit is contained in:
parent
04d3a22212
commit
7e57f55a5a
@ -80,6 +80,7 @@ class Module {
|
||||
if (this.modules.indexOf(moduleOpts) !== -1 || this.modules.indexOf(moduleOpts.src) !== -1) {
|
||||
return false
|
||||
}
|
||||
this.modules.push(moduleOpts.src || moduleOpts)
|
||||
return this.addModule(moduleOpts)
|
||||
}
|
||||
|
||||
@ -116,8 +117,6 @@ class Module {
|
||||
console.error('[Nuxt] Module should be a function', module)
|
||||
process.exit(0)
|
||||
}
|
||||
// Add module to this.modules
|
||||
this.modules.push(module)
|
||||
// Call module with `this` context and pass options
|
||||
return new Promise((resolve, reject) => {
|
||||
const result = module.call(this, options, err => {
|
||||
|
Loading…
Reference in New Issue
Block a user