diff --git a/src/utils.ts b/src/utils.ts index 081ad7b..03d7780 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -141,7 +141,7 @@ export function findNamedChild( let obj = variables // if we have a global matching the exact name of the reference, this is probably what we want - if (obj[reference]) { + if (Object.prototype.hasOwnProperty.call(obj, reference)) { return obj[reference] } diff --git a/tests/handleEvent.data.json b/tests/handleEvent.data.json index c487d41..8f1b349 100644 --- a/tests/handleEvent.data.json +++ b/tests/handleEvent.data.json @@ -266,7 +266,7 @@ "ContractStarted": { "Condition": { "$eq": [ - "$ContractId", + "$.ContractId", "abc123" ] },