Skip to content

Commit 37cf0d0

Browse files
committed
Fix #89
Bind before setting prototype
1 parent 263502f commit 37cf0d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/safari/client-injected.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ if ( window.Worker instanceof Function ) {
7575
return new RealWorker(window.URL.createObjectURL(new Blob([';'], {type:'text/javascript'})));
7676
};
7777
return new RealWorker(url);
78-
};
78+
}.bind(window);
7979
WrappedWorker.prototype = RealWorker.prototype;
80-
window.Worker = WrappedWorker.bind(window);
80+
window.Worker = WrappedWorker;
8181
};
8282

8383
// __MSG_historyScript__

0 commit comments

Comments
 (0)