From d86e510563edeb04d00429906c2b2bcfbb43be4a Mon Sep 17 00:00:00 2001 From: Aaron Ransley Date: Sun, 19 May 2019 11:50:52 -0700 Subject: [PATCH] fix(utils): handle `serializeFunction` edge case (#5754) --- packages/utils/src/serialize.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/utils/src/serialize.js b/packages/utils/src/serialize.js index 9c09f83915..a38dbe88e9 100644 --- a/packages/utils/src/serialize.js +++ b/packages/utils/src/serialize.js @@ -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