Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d311ff6

Browse files
committed
Test: Image head must always be an ArrayBuffer.
1 parent 555782b commit d311ff6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* https://opensource.org/licenses/MIT
1010
*/
1111

12-
/* global describe, before, after, it, Promise */
12+
/* global describe, before, after, it, Promise, ArrayBuffer */
1313
/* eslint-disable no-unused-expressions */
1414

1515
;(function (expect, loadImage) {
@@ -104,7 +104,7 @@
104104
/**
105105
* Helper function to create a blob object from the given image data
106106
*
107-
* @param {*} data Image data
107+
* @param {ArrayBuffer} data Image data
108108
* @param {string} type Image content type
109109
* @returns {Blob} Image Blob object
110110
*/
@@ -118,7 +118,7 @@
118118
window.MozBlobBuilder ||
119119
window.MSBlobBuilder
120120
var builder = new BlobBuilder()
121-
builder.append(data.buffer || data)
121+
builder.append(data)
122122
return builder.getBlob(type)
123123
}
124124
}

0 commit comments

Comments
 (0)