From 8bd5d0edd600f17652d0998a4b50eadfb13ad8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A9rault?= Date: Thu, 20 Jun 2019 17:07:28 +0200 Subject: [PATCH] Fix event.isOffine bug --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a9ec9168c..86be5d470 100755 --- a/src/index.js +++ b/src/index.js @@ -704,7 +704,9 @@ class Offline { event = createLambdaProxyContext(request, this.options, this.velocityContextOptions.stageVariables); } - event.isOffline = true; + if (event && typeof event === 'object') { + event.isOffline = true; + } if (this.service.custom && this.service.custom.stageVariables) { event.stageVariables = this.service.custom.stageVariables;