Skip to content

Commit af4216c

Browse files
committed
Return null if arguments are invalid.
1 parent 0d65d7f commit af4216c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

js/load-image-meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
* @returns {Blob} Combined Blob
193193
*/
194194
function replaceJPEGHead(blob, oldHead, newHead) {
195+
if (!blob || !oldHead || !newHead) return null
195196
return new Blob([newHead, blobSlice.call(blob, oldHead.byteLength)], {
196197
type: 'image/jpeg'
197198
})

0 commit comments

Comments
 (0)