File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,19 @@ function resolveReferences(variablesToResolve, allVariables) {
106106 computedResult . value . info = expression ;
107107 }
108108
109+ // If the result is null but a referenced variable is "Any"-typed (unknown
110+ // structure), accessing a property on it should also yield "Any", not "Null".
111+ // cf. https://github.com/bpmn-io/variable-resolver/issues/87
112+ else if ( computedResult . value . atomicValue === null &&
113+ unresolvedRoots . some ( name => {
114+ const entry = scopedContext . entries [ name ] ;
115+ return entry instanceof EntriesContext &&
116+ getType ( entry . value ) === 'Any' ;
117+ } ) ) {
118+ computedResult = EntriesContext . of ( undefined ) ;
119+ computedResult . value . info = expression ;
120+ }
121+
109122 // Ensure we don't copy the scope from the mapped variable
110123 computedResult . scope = variable . scope ;
111124
You can’t perform that action at this time.
0 commit comments