command-variable icon indicating copy to clipboard operation
command-variable copied to clipboard

Cannot read properties of undefined (reading 'apply')

Open dustinlacewell opened this issue 11 months ago • 2 comments

When I use checkEscapedUI in my inputs, then hitting escape causes VSCode to show a popup with the text:

Cannot read properties of undefined (reading 'apply')

The task doesn't run which is good, but the error is annoying. Thanks for the extension though.

dustinlacewell avatar Jan 04 '25 22:01 dustinlacewell

@dustinlacewell Can you show the task and its inputs, with anonymized names/text. Most likely you use a configuration I have not thought of.

rioj7 avatar Jan 05 '25 11:01 rioj7

@dustinlacewell Looking at the source code the only place I use .apply is in variableReplaceAndFilter. The only case where replacement is not a hard coded string literal or a function is with the ${result} variable. There it is the return value of a complex function. Possibly there is a special case where the __result property is defined and has the value undefined when you escape a particular UI element.

Are you using checkEscapedUI also for remember command and variables?

rioj7 avatar Feb 26 '25 09:02 rioj7