Edit Fields node bug with optional chaining operator

tested with versions: 147.3, 155.3
docker

Hi,

There seems to be a problem in the Edit Fields node, when your code contains an optional chaining operator, for instance, this code returns ‘not found’ although the data exists:

{{ (() => {
   const key_a = 'key1'
   const key_b = 'key2'
   return $('Test Data').first().json[key_a]?.[key_b] ?? 'not found'
})() }}

Note: it works fine , if you don’t use variables, but literal keys, like:

return $('Test Data').first().json['key1']?.['key2'] ?? 'not found'

It does work correctly in de code node, see workflow below.

Kind regards,

Jos