Skip to content

Commit 83070b5

Browse files
committed
Demo: Guard for canvas.toBlob() returning null.
1 parent 9233ecd commit 83070b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

js/demo/demo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ $(function () {
132132
loadImage.writeExifData(data.imageHead, data, 'Orientation', 1)
133133
}
134134
img.toBlob(function (blob) {
135+
if (!blob) return
135136
loadImage.replaceHead(blob, data.imageHead, function (newBlob) {
136137
content
137138
.attr('href', loadImage.createObjectURL(newBlob))

0 commit comments

Comments
 (0)