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 7fe1622 commit aace491Copy full SHA for aace491
lib/worker/base.js
@@ -184,9 +184,10 @@ const run = async options => {
184
const loadedModule = await load(path);
185
186
if (typeof loadedModule === 'function') {
187
- await loadedModule.apply(...options);
+ await loadedModule(...options);
188
} else if (typeof loadedModule.default === 'function') {
189
- await loadedModule.default.apply(...options);
+ const {default: fn} = loadedModule;
190
+ await fn(...options);
191
} else {
192
channel.send({type: 'non-invokable-require-option'});
193
}
0 commit comments