We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42fa10e commit 086b395Copy full SHA for 086b395
src/utils/index.js
@@ -86,8 +86,12 @@ export function parseFunction(fn, presetOptions = {}) {
86
}
87
)
88
89
- // remove block statement needed to transform & trim block whitespace
90
- parsed.body = transpiled.code.slice(1, -1).trim()
+ if (transpiled.code.substr(0, 1) === '{') {
+ // remove block statement needed to transform & trim block whitespace
91
+ parsed.body = transpiled.code.slice(1, -1).trim()
92
+ } else {
93
+ parsed.body = transpiled.code
94
+ }
95
96
if (!fnCache[fnString]) {
97
fnCache[fnString] = {}
0 commit comments