mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
refactor: remove alreadyRequired which is always true
This commit is contained in:
parent
b34abc7efe
commit
73509c29ba
@ -120,12 +120,10 @@ 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
|
||||||
|
Loading…
Reference in New Issue
Block a user