Permalink
Browse files

Added code to pass unit tests

  • Loading branch information...
1 parent ef16396 commit f16a3c622eabdde1c36226edded35ad1a0d56a11 amarcu5 committed Mar 29, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 jszip.js
View
4 jszip.js
@@ -475,6 +475,10 @@ JSZip.prototype = (function () {
});
var compression = options.compression.toUpperCase();
+ if (!JSZip.compressions[compression]) {
+ throw compression + " is not a valid compression method !";
+ }
+
// The central directory, and files data
var directory = [], files = [], fileOffset = 0;

0 comments on commit f16a3c6

Please sign in to comment.