diff --git a/package.json b/package.json index d7c4750..4709b39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@serverless-guru/logger", - "version": "1.0.3", + "version": "1.0.4", "description": "Common logger utility", "main": "./lib/cjs/index.js", "types": "./lib/cjs/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 65437d5..49fe52d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,13 +64,8 @@ class Logger { const arrayToLowerCase = (array: StringArray): StringArray => { if (Array.isArray(array)) { return array - .map((el) => { - if (typeof el === "string") { - return el.toLowerCase(); - } - return undefined; - }) - .filter((el) => typeof el !== "undefined"); + .filter((el) => typeof el === "string") + .map((el) => el.toLowerCase()); } return []; };