Fix decodeBase64 error with thumbnails

This commit is contained in:
yflory 2019-09-13 15:44:35 +02:00
parent 489bec6285
commit be85efcb21

View File

@ -261,7 +261,8 @@ define([
var addThumbnail = function (err, thumb, $span, cb) { var addThumbnail = function (err, thumb, $span, cb) {
var u8 = Nacl.util.decodeBase64(thumb.split(',')[1]); var split = thumb.split(',');
var u8 = Nacl.util.decodeBase64(split[1] || split[0]);
var blob = new Blob([u8], { var blob = new Blob([u8], {
type: 'image/png' type: 'image/png'
}); });