Skip to content

Commit

Permalink
iOS Safari 10 bug where SockJS couldn't be found
Browse files Browse the repository at this point in the history
Fixes iOS Safari 10 bug. At the root, this works around a bug where Safari's eval's scope was getting confused.  Something to do with [this issue](https://stackoverflow.com/questions/46036960/evaluated-expression-const-variable-scope-in-safari)

[bug reference](webpack#1090 (comment))
  • Loading branch information
abcd-ca authored Dec 18, 2017
1 parent a9327e5 commit f5c6e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SockJS = require('sockjs-client/dist/sockjs');
let retries = 0;
let sock = null;

function socket(url, handlers) {
const socket = function(url, handlers) {
sock = new SockJS(url);

sock.onopen = function onopen() {
Expand Down

0 comments on commit f5c6e8b

Please sign in to comment.