Fix #1151 by catching errors thrown when calling canvas.toDataURL

pull/1158/head
Jed Fox 5 years ago committed by GitHub
parent 19314608af
commit f42afb6f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,10 +59,14 @@ withImage = (url, action) ->
ctx.drawImage(docImg, sourceX, sourceY, sourceSize, sourceSize, destinationCoords, destinationCoords, destinationSize, destinationSize)
urlCache[doc.slug] = canvas.toDataURL()
favicon.href = urlCache[doc.slug]
currentSlug = doc.slug
try
urlCache[doc.slug] = canvas.toDataURL()
favicon.href = urlCache[doc.slug]
currentSlug = doc.slug
catch error
Raven.captureException error, { level: 'info' }
@resetFavicon()
)
)

Loading…
Cancel
Save