From 6a372ac15dc5291d8af51e907e0edb39d3da0f08 Mon Sep 17 00:00:00 2001 From: timrog Date: Wed, 16 Dec 2020 08:41:21 +0000 Subject: [PATCH] Fix Issue #7 --- naming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/naming.js b/naming.js index 4fd281b..f68f8dc 100644 --- a/naming.js +++ b/naming.js @@ -49,7 +49,7 @@ module.exports = { const self = this var logGroup _.forEach(self.provider.serverless.service.functions, (functionObj, name) => { - if (JSON.stringify(functionName).includes(name + '"') || JSON.stringify(functionName).includes(name + '-')) { + if (new RegExp(`(-|^)${name}(-|$)`).test(functionName)) { logGroup = this._getMappings(name).logGroup return false }