Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/CartoDB/LZMA-JS into Cart…

…oDB-master
  • Loading branch information...
commit cd43df031aa4f30cbf2a85fbdb71ff5ef2eb3858 2 parents df17429 + 782a2d2
@nmrugg authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/lzma_worker.js
View
10 src/lzma_worker.js
@@ -3910,10 +3910,12 @@ var LZMA = (function () {
(function create_onmessage() {
/// Create the global onmessage function.
onmessage = function (e) {
- if (e.data.action === action_compress) {
- LZMA.compress(e.data.data, e.data.mode, e.data.callback_num);
- } else {
- LZMA.decompress(e.data.data, e.data.callback_num);
+ if (e && e.data) {
+ if (e.data.action === action_compress) {
+ LZMA.compress(e.data.data, e.data.mode, e.data.callback_num);
+ } else if (e.data.action === action_decompress) {
+ LZMA.decompress(e.data.data, e.data.callback_num);
+ }
}
}
}());

0 comments on commit cd43df0

Please sign in to comment.
Something went wrong with that request. Please try again.