Permalink
Browse files

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

…oDB-master
  • Loading branch information...
2 parents df17429 + 782a2d2 commit cd43df031aa4f30cbf2a85fbdb71ff5ef2eb3858 @nmrugg nmrugg committed Nov 10, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/lzma_worker.js
View
@@ -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.