Adaptive expression context access with non-standard objects #4860
Labels
bug
Indicates an unexpected problem or an unintended behavior.
needs-triage
The issue has just been created and it has not been reviewed by the team.
Versions
What package version of the SDK are you using. 4.23.1
What nodejs version are you using 22
What browser version are you using -
What os are you using macOS
Describe the bug
When providing a non-standard object to
$root
inAC.expand()
when rendering adaptive cards, the context cannot access properties that are in non-standard objects.To Reproduce
AC.expand({ $root: new DataObjectOfYourChoice({ propertyToAccess: "hasAValue" }) })
AC template:
"text": "${propertyToAccess}"
Expected behavior
Text should show "hasAValue", but the property is returned as undefined
Additional context
I tried opening a fix PR for this but i'm unsure of the contribution rules in this repo of if it is even possible. Pushing to a feature branch is not allowed for my git user.
The fix would be in
libraries/adaptive-expressions/src/functionUtils.internal.ts
lines 221-232:My change is the
else
block.The text was updated successfully, but these errors were encountered: