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

Missing character causes error #42

Closed
jenstornell opened this issue Dec 8, 2016 · 7 comments
Closed

Missing character causes error #42

jenstornell opened this issue Dec 8, 2016 · 7 comments
Labels

Comments

@jenstornell
Copy link

The js ends with:

 return ajax
})

That cases and error if I merge it with other javascripts.

Change it to:

 return ajax
});
@fdaciuk
Copy link
Owner

fdaciuk commented Dec 8, 2016

Hi @jenstornell! Could you show me the code are you using?

@jenstornell
Copy link
Author

@fdaciuk
Copy link
Owner

fdaciuk commented Dec 8, 2016

Yes, this is the lib code, and it is ok. I want to see your code =)

But to fix it, you should add a semicolon on your code, if you are using IIFE, for example, like this.

@fdaciuk fdaciuk closed this as completed Dec 8, 2016
@fdaciuk fdaciuk added the invalid label Dec 8, 2016
@fdaciuk
Copy link
Owner

fdaciuk commented Dec 8, 2016

@jenstornell you should use minified code too, instead the source.

@jenstornell
Copy link
Author

jenstornell commented Dec 8, 2016

I combine ajax.js with this file: https://github.com/Alex-D/Cookies-EU-banner/blob/master/src/cookies-eu-banner.js (cookie script last).

some-ajax-code
some-cookie-js-code

Maybe it's a semicolon missing in the cookie js then?

https://github.com/Alex-D/Cookies-EU-banner/blob/master/src/cookies-eu-banner.js#L1

@jenstornell
Copy link
Author

About minified code... I don't like to use the minified code. Instead I use Gulp to minify it. That way it's easier for me to debug it on the localhost. So, minified on the live server, not minified on the localhost.

@fdaciuk
Copy link
Owner

fdaciuk commented Dec 8, 2016

No problem about minified code. You can use source in this case =)

Maybe it's a semicolon missing in the cookie js then?

Yes, adding a semicolon at the first position, it should works like a charm =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants