You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
Whenever there's a comment at the last line of a script, no final semicolon (;) will be added even if the script needs it. When concatenated with the next script, the lack of this final semicolon leads to fatal issues.
Consider the following two scripts:
(function() {
console.log('ok1');
})()
// some comment
(function() {
console.log('ok2');
})()
Since the last line of script 1 has a comment, no semicolon is added and the final resulting script is interpreted as:
throwing a Uncaught TypeError: (intermediate value)(...) is not a function.
And before anyone says that this is most probably an issue with the source scripts, the actual case which led me to find this issue is a source map comment automatically added to the end of some scripts.
More specifically, for me, that was the shadycss shim required by the polymer 2.0 core.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Whenever there's a comment at the last line of a script, no final semicolon (
;
) will be added even if the script needs it. When concatenated with the next script, the lack of this final semicolon leads to fatal issues.Consider the following two scripts:
Since the last line of script 1 has a comment, no semicolon is added and the final resulting script is interpreted as:
throwing a
Uncaught TypeError: (intermediate value)(...) is not a function
.And before anyone says that this is most probably an issue with the source scripts, the actual case which led me to find this issue is a source map comment automatically added to the end of some scripts.
More specifically, for me, that was the shadycss shim required by the polymer 2.0 core.
The text was updated successfully, but these errors were encountered: