Skip to content

Commit

Permalink
fix(utils): add catch statement to non function block in `serializeFu…
Browse files Browse the repository at this point in the history
…nction` (#6776) (#6777)
  • Loading branch information
crutch12 authored and pi0 committed Dec 16, 2019
1 parent 0ef6c72 commit b2a35d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/src/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export function serializeFunction (func) {
.replace('function function', 'function')
}

serializeFunction.internalFunctionRE = /^(\s*)(?!(?:if)|(?:for)|(?:while)|(?:switch))(\w+)\s*\((.*?)\)\s*\{/gm
serializeFunction.internalFunctionRE = /^(\s*)(?!(?:if)|(?:for)|(?:while)|(?:switch)|(?:catch))(\w+)\s*\((.*?)\)\s*\{/gm
serializeFunction.assignmentRE = /^(\s*):(\w+)\(/gm

0 comments on commit b2a35d2

Please sign in to comment.