Skip to content

Fix JavaScript function declaration syntax in iframe template#36

Merged
MikeVerlinde merged 2 commits intomasterfrom
claude/investigate-magento-issue-ROU0v
Apr 22, 2026
Merged

Fix JavaScript function declaration syntax in iframe template#36
MikeVerlinde merged 2 commits intomasterfrom
claude/investigate-magento-issue-ROU0v

Conversation

@koenvdwetering
Copy link
Copy Markdown

Summary

This PR corrects JavaScript syntax errors in the iframe template by converting function declarations to proper function expressions with semicolons.

Key Changes

  • Changed window.tagging_gtm_simple_hash = function(eventData) { ... } to end with }; instead of }
  • Changed window.tagging_gtm_advanced_hash = function(eventData) { ... } to end with }; instead of }
  • Changed window.tagging_gtm_save_hash = function(hash, marketingObject) { ... } to end with }; instead of }

Implementation Details

These changes ensure proper JavaScript syntax for function expressions assigned to window objects. Function expressions should be terminated with a semicolon, following JavaScript best practices and linting standards. This prevents potential syntax errors and improves code consistency across the codebase.

https://claude.ai/code/session_01UA52TPmLooaznkU249WJze

claude and others added 2 commits April 22, 2026 10:00
Without the trailing semicolons, HTML minification collapses the inline
<script> into a single line where `}window.tagging_gtm_advanced_hash`
breaks JS parsing with a syntax error.

https://claude.ai/code/session_01UA52TPmLooaznkU249WJze
@MikeVerlinde MikeVerlinde merged commit cec43bb into master Apr 22, 2026
1 check passed
@MikeVerlinde MikeVerlinde deleted the claude/investigate-magento-issue-ROU0v branch April 22, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants