diff --git a/lib/utils.js b/lib/utils.js index fe585f40..90d557ff 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -450,25 +450,7 @@ exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinarySt // if inputData is already a promise, this flatten it. var promise = external.Promise.resolve(inputData).then(function(data) { - - - var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1); - - if (isBlob && typeof FileReader !== "undefined") { - return new external.Promise(function (resolve, reject) { - var reader = new FileReader(); - - reader.onload = function(e) { - resolve(e.target.result); - }; - reader.onerror = function(e) { - reject(e.target.error); - }; - reader.readAsArrayBuffer(data); - }); - } else { - return data; - } + return support.blob && data instanceof Blob ? data.arrayBuffer() : data; }); return promise.then(function(data) { diff --git a/package-lock.json b/package-lock.json index c275b7f4..cd671b51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "jszip", - "version": "3.10.0", + "version": "3.10.1", "license": "(MIT OR GPL-3.0-or-later)", "dependencies": { "lie": "~3.3.0",