Skip to content

Commit b656af4

Browse files
committed
fix: Use .apply(this, args) for wrapped handler instead
1 parent 937f4fe commit b656af4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ function wrapHandler() {
6565
return iopipe(importedModule[handlerToWrap]);
6666
}
6767

68-
module.exports.handler = (event, context, callback) => {
68+
module.exports.handler = function handler(...args) {
6969
if (!wrappedHandler) {
7070
wrappedHandler = wrapHandler();
7171
}
7272

73-
return wrappedHandler(event, context, callback);
73+
return wrappedHandler.apply(this, args);
7474
};

0 commit comments

Comments
 (0)