File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,12 @@ export function handleEvent<Context = unknown, Event = unknown>(
9191 conditionResult = test (
9292 handler . Condition ,
9393 {
94- Value : event ,
94+ ... ( newContext || { } ) ,
9595 ...( options . contractId && {
9696 ContractId : options . contractId ,
9797 } ) ,
98- ...( newContext || { } ) ,
9998 ...( definition . Constants || { } ) ,
99+ Value : event ,
100100 } ,
101101 {
102102 pushUniqueAction ( reference , item ) {
@@ -155,30 +155,28 @@ export function handleEvent<Context = unknown, Event = unknown>(
155155 [ action ] : actionSet [ action ] ,
156156 } ,
157157 {
158- Value : event ,
158+ ... newContext ,
159159 ...( options . contractId && {
160160 ContractId : options . contractId ,
161161 } ) ,
162- ...newContext ,
163162 ...( definition . Constants || { } ) ,
163+ Value : event ,
164164 } ,
165165 {
166- originalContext : definition . Context ?? { }
167- } ,
166+ originalContext : definition . Context ?? { } ,
167+ }
168168 )
169169 }
170170 }
171171
172172 // drop this specific event's value
173- // @ts -expect-error
174- if ( newContext . Value ) {
173+ if ( newContext . hasOwnProperty ( "Value" ) ) {
175174 // @ts -expect-error
176175 delete newContext . Value
177176 }
178177
179178 // drop this specific event's ContractId
180- // @ts -expect-error
181- if ( newContext . ContractId ) {
179+ if ( newContext . hasOwnProperty ( "ContractId" ) ) {
182180 // @ts -expect-error
183181 delete newContext . ContractId
184182 }
You can’t perform that action at this time.
0 commit comments