From be85efcb216498141da01778a493c9144a1b1fb9 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 13 Sep 2019 15:44:35 +0200 Subject: [PATCH] Fix decodeBase64 error with thumbnails --- www/common/common-thumbnail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/common-thumbnail.js b/www/common/common-thumbnail.js index c22e2acee..e9c478bff 100644 --- a/www/common/common-thumbnail.js +++ b/www/common/common-thumbnail.js @@ -261,7 +261,8 @@ define([ 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], { type: 'image/png' });