Skip to content

Commit 25b4a87

Browse files
author
ljacobsson
committed
fix: Null-value pattern bug #46
1 parent ae9fcc9 commit 25b4a87

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mhlabs/evb-cli",
3-
"version": "1.1.39",
3+
"version": "1.1.40",
44
"description": "A package for building EventBridge/CloudWatch Events patterns",
55
"main": "index.js",
66
"scripts": {

src/commands/local/listeners/localPatternListener.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const intrinsicFunctions = [
2121
"Ref",
2222
];
2323
let output = console;
24-
function findAllKeys(obj, keyArray) {
25-
keyArray.push(...Object.keys(obj));
26-
for (const prop of Object.keys(obj)) {
24+
function findAllKeys(obj, keyArray) {
25+
keyArray.push(...Object.keys(obj || {}));
26+
for (const prop of Object.keys(obj || {})) {
2727
if (
2828
!obj[prop] ||
2929
typeof obj[prop] !== "object" ||

0 commit comments

Comments
 (0)