@@ -355,23 +355,17 @@ export class InternalVariables extends EventEmitter<InternalModuleFragmentEvents
355355 ) {
356356 if ( ! action . options . name ) return
357357
358- // nocommit - this needs to be adjusted to handle triggers/expression variables
359- const location = ParseLocationString ( stringifyVariableValue ( action . options . location ) , extras . location )
360- const theControlId = location ? this . #pageStore. getControlIdAt ( location ) : null
361-
362- // let theControlId: string | null = null
363- // if (action.rawOptions.location_target === 'this') {
364- // // This could be any type of control (button, trigger, etc)
365- // theControlId = extras.controlId
366- // } else {
367- // // Parse the location of a button
368- // const result = this.#internalUtils.parseInternalControlReferenceForActionOrFeedback(
369- // extras,
370- // action.rawOptions,
371- // true
372- // )
373- // theControlId = result.location ? this.#pageStore.getControlIdAt(result.location) : null
374- // }
358+ const locationStr = stringifyVariableValue ( action . options . location )
359+
360+ let theControlId : string | null = null
361+ if ( locationStr ?. trim ( ) . toLocaleLowerCase ( ) === 'this' ) {
362+ // This could be any type of control (button, trigger, etc)
363+ theControlId = extras . controlId
364+ } else {
365+ // Parse the location of a button
366+ const location = ParseLocationString ( locationStr , extras . location )
367+ theControlId = location ? this . #pageStore. getControlIdAt ( location ) : null
368+ }
375369 if ( ! theControlId ) return
376370
377371 const control = this . #controlsController. getControl ( theControlId )
0 commit comments