Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 58d6e13

Browse files
authored
Support defining actions from functions with names other than main (#49)
1 parent 50498f2 commit 58d6e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

composer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class Composer {
247247
delete options.filename
248248
}
249249
if (options && typeof options.action === 'function') {
250-
options.action = `${options.action}`
250+
options.action = `const main = ${options.action}`
251251
if (options.action.indexOf('[native code]') !== -1) throw new ComposerError('Cannot capture native function', options.action)
252252
}
253253
if (options && typeof options.action === 'string') {

0 commit comments

Comments
 (0)