mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 09:25:54 +00:00
chore: update
This commit is contained in:
parent
4b85c83812
commit
e50a7e43fb
@ -86,15 +86,22 @@ export function createNuxt (options: NuxtOptions): Nuxt {
|
||||
|
||||
const proxied = onChange(
|
||||
options,
|
||||
(keys, value, previousValue, applyData) => {
|
||||
if (value === previousValue && !applyData) {
|
||||
(keys, newValue, previousValue, applyData) => {
|
||||
if (newValue === previousValue && !applyData) {
|
||||
return
|
||||
}
|
||||
let value = applyData?.args ?? newValue
|
||||
// Make a shallow copy of the value
|
||||
if (Array.isArray(value)) {
|
||||
value = [...value]
|
||||
} else if (typeof value === 'object') {
|
||||
value = { ...(value as any) }
|
||||
}
|
||||
nuxt._debug!.moduleMutationRecords!.push({
|
||||
module: currentModule,
|
||||
keys,
|
||||
target: 'nuxt.options',
|
||||
value: applyData?.args ?? value,
|
||||
value,
|
||||
timestamp: Date.now(),
|
||||
method: applyData?.name,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user