Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added some extra checks to make sure we're in a Web Worker.

  • Loading branch information...
commit 6313bae5afab4479406fe6dc30e0cda93f5d0483 1 parent 64ddc86
@nmrugg authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/lzma_worker.js
View
2  src/lzma_worker.js
@@ -3906,7 +3906,7 @@ var LZMA = (function () {
/// Are we in a Web Worker?
/// This seems to be the most reliable way to detect this.
- if (typeof onmessage !== "undefined") {
+ if (typeof onmessage !== "undefined" && (typeof window === "undefined" || typeof window.document === "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.