Skip to content

Commit a5e3695

Browse files
authored
Edge case of incorrectly serialized function
Should fix vuejs#568
1 parent fb782d3 commit a5e3695

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ export function getCustomComponentDefinitionDetails (def) {
230230
}
231231

232232
export function getCustomFunctionDetails (func) {
233-
const args = func.toString().match(/\(.*\)/)[0]
233+
const matches = func.toString().match(/\(.*\)/)
234+
const args = matches ? matches[0] : '(?)'
234235
return {
235236
_custom: {
236237
type: 'function',

0 commit comments

Comments
 (0)