Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make Web Workers work in Chrome, again.

  • Loading branch information...
commit 8e4a293a77ab6e40983e2864b9fecba5a6568c88 1 parent 50a46b1
@nmrugg authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/lzma_worker.js
View
4 src/lzma_worker.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.