Permalink
Browse files

Make Web Workers work in Chrome, again.

  • Loading branch information...
1 parent 50a46b1 commit 8e4a293a77ab6e40983e2864b9fecba5a6568c88 @nmrugg nmrugg committed Nov 9, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/lzma_worker.js
View
@@ -3904,7 +3904,9 @@ var LZMA = (function () {
}
}());
- if (typeof Worker !== "undefined") {
+ /// Are we in a Web Worker?
+ /// This seems to be the most reliable way to detect this.
+ if (typeof onmessage !== "undefined") {
(function create_onmessage() {
/// Create the global onmessage function.
onmessage = function (e) {

0 comments on commit 8e4a293

Please sign in to comment.