We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 680476f commit e6fa812Copy full SHA for e6fa812
src/lib/faas/engine.ts
@@ -20,7 +20,7 @@
20
${code};
21
const __main__ = exports.main || exports.default
22
if(!__main__) { throw new Error('FunctionExecError: main function not found') }
23
- if(!(__main__ instanceof Function)) { throw new Error('FunctionExecError: main function must be callable')}
+ if(typeof __main__ !== 'function') { throw new Error('FunctionExecError: main function must be callable')}
24
__runtime_promise = __main__(__context__ )
25
`
26
@@ -30,7 +30,7 @@
30
const sandbox: RuntimeContext = {
31
__context__: incomingCtx.context,
32
module: _module,
33
- exports: module.exports,
+ exports: _module.exports,
34
__runtime_promise: null,
35
console: fconsole,
36
less: incomingCtx.less,
0 commit comments