feat: added wildcard support in webform_include_js hook (#33751)

This commit is contained in:
Samar Raj 2025-08-22 16:01:41 +05:30 committed by GitHub
parent c6032ebdb9
commit 6907856ddc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -464,7 +464,9 @@ def get_context(context):
if os.path.exists(js_path):
script = frappe.render_template(open(js_path).read(), context)
for path in get_code_files_via_hooks("webform_include_js", context.doc_type):
for path in get_code_files_via_hooks(
"webform_include_js", context.doc_type
) + get_code_files_via_hooks("webform_include_js", "*"):
custom_js = frappe.render_template(open(path).read(), context)
script = "\n\n".join([script, custom_js])