use "hook_position" instead of "hook_positions"

match the name of the enum
This commit is contained in:
Masen Furer 2024-12-13 12:39:32 -08:00
parent f31c6c1d9d
commit fb4d22a1e3
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ export function {{tag_name}} () {
{{ hook }}
{% endfor %}
{% for hook, data in component._get_all_hooks().items() if not data.position or data.position == const.hook_positions.PRE_TRIGGER %}
{% for hook, data in component._get_all_hooks().items() if not data.position or data.position == const.hook_position.PRE_TRIGGER %}
{{ hook }}
{% endfor %}
@ -13,7 +13,7 @@ export function {{tag_name}} () {
{{ hook }}
{% endfor %}
{% for hook,data in component._get_all_hooks().items() if data.position and data.position == const.hook_positions.POST_TRIGGER %}
{% for hook, data in component._get_all_hooks().items() if data.position and data.position == const.hook_position.POST_TRIGGER %}
{{ hook }}
{% endfor %}

View File

@ -45,7 +45,7 @@ class ReflexJinjaEnvironment(Environment):
"on_load_internal": constants.CompileVars.ON_LOAD_INTERNAL,
"update_vars_internal": constants.CompileVars.UPDATE_VARS_INTERNAL,
"frontend_exception_state": constants.CompileVars.FRONTEND_EXCEPTION_STATE_FULL,
"hook_positions": constants.Hooks.HookPosition,
"hook_position": constants.Hooks.HookPosition,
}