mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
fix(utils): handle serializeFunction
edge case (#5754)
This commit is contained in:
parent
38fc721f50
commit
d86e510563
@ -45,6 +45,7 @@ export function serializeFunction(func) {
|
||||
}
|
||||
})
|
||||
.replace(`${func.name || 'function'}(`, 'function (')
|
||||
.replace(`function function`, `function`)
|
||||
}
|
||||
|
||||
serializeFunction.internalFunctionRE = /^(\s*)(?!(?:if)|(?:for)|(?:while)|(?:switch))(\w+)\s*\((.*?)\)\s*\{/gm
|
||||
|
Loading…
Reference in New Issue
Block a user