-
Notifications
You must be signed in to change notification settings - Fork 194
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
IE11 SyntaxError #117
Comments
It turns out the syntaxError is specifically to that I ended up wrapping it with a try/catch for now just so I can use it with other browsers without the IE11 error
|
@stellusUi - Are you by any chance creating an anchor to build the URL? If so I ran into the same problem and it was because IE11 strips the leading / from pathname and when the URL was reassembled, it was badly formed. I solved it by checking for a leading / in pathname and inserting one if it wasn't there e.g.: // IE11 strips the leading "/" from the path
var pnSep = uri.pathname.indexOf("/") === 0 ? "" : "/";
var socketURL = protocol + '//' + uri.hostname + ':' + uri.port + pnSep + uri.pathname + '/websocket' + "?authenticationToken=" + authenticationToken + "&sessionId=" + sessionId; |
I seem to keep getting a SyntaxError in IE11 when using the minified version of this package (2.0.0).
It also happens when I minify it as part of my full library set as well.
The problem seems to be the comma before the
this.createWebSocketBackend
throw new Error("Invalid url provided");return t?new a(e,t):new a(e)},this.createWebSocketBackend
The original source version doesn't seem to warrant a new comma from what I can tell (~Line 388)
I'm using [email protected] and can't seem to find a way to remove the comma using any of the UglifyJS2 compressor options.
https://github.com/mishoo/UglifyJS2#compressor-options
Thoughts welcomed.
Thanks in advance
The text was updated successfully, but these errors were encountered: