From 9842bf2d36d8661d0da1878a1721c06c2604799d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A9rault?= Date: Sat, 8 Jun 2019 16:29:33 +0200 Subject: [PATCH] Fix requests bug --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index da02ec25e..9354f4dd9 100755 --- a/src/index.js +++ b/src/index.js @@ -708,7 +708,7 @@ class Offline { debugLog('_____ HANDLER RESOLVED _____'); // User should not call context.done twice - if (this.requests[requestId].done) { + if (!this.requests[requestId] || this.requests[requestId].done) { this.printBlankLine(); const warning = fromPromise ? `Warning: handler '${funName}' returned a promise and also uses a callback!\nThis is problematic and might cause issues in your lambda.`