Skip to content

Commit 98de525

Browse files
committed
Use Blob.slice directly instead of via a wrapper.
1 parent 7231af8 commit 98de525

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

js/load-image-meta.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,12 @@
2929
})(function (loadImage) {
3030
'use strict'
3131

32-
var hasblobSlice =
33-
typeof Blob !== 'undefined' &&
32+
loadImage.blobSlice =
33+
loadImage.global.Blob &&
3434
(Blob.prototype.slice ||
3535
Blob.prototype.webkitSlice ||
3636
Blob.prototype.mozSlice)
3737

38-
loadImage.blobSlice =
39-
hasblobSlice &&
40-
function () {
41-
var slice = this.slice || this.webkitSlice || this.mozSlice
42-
return slice.apply(this, arguments)
43-
}
44-
4538
loadImage.metaDataParsers = {
4639
jpeg: {
4740
0xffe1: [], // APP1 marker

0 commit comments

Comments
 (0)