Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid syntax collision with self-invoking function #615

Closed

Conversation

aaa123eee
Copy link
Contributor

@aaa123eee aaa123eee commented Aug 8, 2024

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests

Description

Currently, the replacement of this symbol includes an expression wrapped with braces. It might cause an incorrect syntax if the previous function declaration has no semicolon at the end

Example: setupUid2Sdk is called immediately
image

I suggest an adjustment to avoid syntax collision in 3rd party scripts since we have no control over those scripts. Instead of an expression in braces, we can encapsulate this logic using a function

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

Copy link

vercel bot commented Aug 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
partytown ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2024 4:09pm

@aaa123eee
Copy link
Contributor Author

linting is failing on the file I didn't touch :-(

@aaa123eee
Copy link
Contributor Author

I've just added a typescript version bump that should solve the issue with the lint job #616

@aaa123eee aaa123eee marked this pull request as draft September 23, 2024 15:10
@aaa123eee
Copy link
Contributor Author

unfortunately this fix breaks other usages, converted to draft

anyway it would be nice to solve the issue anyhow

@gioboa
Copy link
Member

gioboa commented Nov 17, 2024

Thanks for the update, let's create an issue for that and we can link this PR too. I'll close this one because I would like to have no pending PRs in the list. Thanks for your help btw 👏

@gioboa gioboa closed this Nov 17, 2024
@aaa123eee aaa123eee deleted the fix-potential-syntax-collision branch November 17, 2024 10:55
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.

2 participants