Skip to content

Commit 480018d

Browse files
committed
fix Stuk#899
1 parent 2ceb998 commit 480018d

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

lib/utils.js

+1-19
Original file line numberDiff line numberDiff line change
@@ -450,25 +450,7 @@ exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinarySt
450450

451451
// if inputData is already a promise, this flatten it.
452452
var promise = external.Promise.resolve(inputData).then(function(data) {
453-
454-
455-
var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1);
456-
457-
if (isBlob && typeof FileReader !== "undefined") {
458-
return new external.Promise(function (resolve, reject) {
459-
var reader = new FileReader();
460-
461-
reader.onload = function(e) {
462-
resolve(e.target.result);
463-
};
464-
reader.onerror = function(e) {
465-
reject(e.target.error);
466-
};
467-
reader.readAsArrayBuffer(data);
468-
});
469-
} else {
470-
return data;
471-
}
453+
return support.blob && data instanceof Blob ? data.arrayBuffer() : data;
472454
});
473455

474456
return promise.then(function(data) {

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)