mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
refactor: remove alreadyRequired which is always true
This commit is contained in:
parent
b34abc7efe
commit
73509c29ba
@ -120,13 +120,11 @@ export default class ModuleContainer {
|
|||||||
// If requireOnce specified & module from NPM or with specified name
|
// If requireOnce specified & module from NPM or with specified name
|
||||||
if (requireOnce && name) {
|
if (requireOnce && name) {
|
||||||
const alreadyRequired = this.requiredModules.indexOf(name) !== -1
|
const alreadyRequired = this.requiredModules.indexOf(name) !== -1
|
||||||
if (requireOnce && alreadyRequired) {
|
if (alreadyRequired) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!alreadyRequired) {
|
|
||||||
this.requiredModules.push(name)
|
this.requiredModules.push(name)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Call module with `this` context and pass options
|
// Call module with `this` context and pass options
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user