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

SyntaxError Unexpected token = #491

Open
brandonsturgeon opened this issue May 7, 2022 · 2 comments
Open

SyntaxError Unexpected token = #491

brandonsturgeon opened this issue May 7, 2022 · 2 comments

Comments

@brandonsturgeon
Copy link

brandonsturgeon commented May 7, 2022

Hi, I'm getting this error very frequently from visitors.

We have to support a super old verison of chromium, so I imagine it's just not working for something that old.
Worth noting, though, that we've used ga-lite for years and it definitely used to work 🤷

We're on 2.1.6, hosted here: https://loading.cfcservers.org/assets/js/ga-lite.min.js

If I run that code through JSLint it throws the same error.

If I make this change:

-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof 
+!function(e,t){"object"==typeof exports&&"object"==typeof module?(module.exports=t()):"function"==typeof 

It doesn't fail there anymore, but there's another one shortly that throws an error. I made it up to character 1,000 before I gave up - there's gotta be an easier way.

If this is just syntax, is there some way I can make this load on older browsers?

@jehna
Copy link
Owner

jehna commented May 16, 2022

Hey, thank you for opening the issue!

Do you have any specifics on how old Chromium you're supporting? This project uses Babel, which I think can be configured to support arbitrary old browsers at least all the way down to ES5 via browserslist.

@brandonsturgeon
Copy link
Author

It's a modified version of Chromium so it's hard to point at a specific version, but roughly v11?

The issue doesn't even seem to be new features or anything, just weird syntax issues. So far, just requiring more parens around some ternaries and such - which would definitely still be compatible with newer browsers.

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

No branches or pull requests

2 participants