mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
clone options to prevent unwanted side-effects
fixes with-config test that runs nuxt twice with same nuxt.config.js file
This commit is contained in:
parent
76c3b358cc
commit
b61694ca21
@ -11,9 +11,12 @@ import Server from './server'
|
||||
import Defaults from './defaults'
|
||||
|
||||
export default class Nuxt extends Tapable {
|
||||
constructor (options = {}) {
|
||||
constructor (_options = {}) {
|
||||
super()
|
||||
|
||||
// Clone options to prevent unwanted side-effects
|
||||
const options = Object.assign({}, _options)
|
||||
|
||||
// Normalize options
|
||||
if (options.loading === true) {
|
||||
delete options.loading
|
||||
|
@ -111,4 +111,5 @@ test.after('Should be able to start Nuxt with build done', async t => {
|
||||
config.rootDir = rootDir
|
||||
config.dev = false
|
||||
nuxt = new Nuxt(config)
|
||||
await nuxt.init()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user