From 6cd556cd4a9578222f346e5da80092d90c973af6 Mon Sep 17 00:00:00 2001 From: Adam Jones Date: Sun, 15 Oct 2023 16:48:40 +0100 Subject: [PATCH] Run in all stages if no allowlist specified (#17) Fixes https://github.com/99x/serverless-dynamodb-local/issues/225 Fixes https://github.com/99x/serverless-dynamodb-local/issues/229 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1a06351..223352e 100644 --- a/index.js +++ b/index.js @@ -165,7 +165,7 @@ class ServerlessDynamodbLocal { * @return {Boolean} if the handler can run for the provided stage */ shouldExecute() { - if (this.config.stages && this.config.stages.includes(this.stage)) { + if (!this.config.stages || this.config.stages.includes(this.stage)) { return true; } return false;