From 86f23dcfc0df300bc9e20ae7d5efceaf427a9d74 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 1 Sep 2021 18:08:03 +0530 Subject: [PATCH] guarantee async behaviour when creating thumbnails --- www/common/common-thumbnail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/common-thumbnail.js b/www/common/common-thumbnail.js index 01e89e5d1..e3b328dc1 100644 --- a/www/common/common-thumbnail.js +++ b/www/common/common-thumbnail.js @@ -196,7 +196,7 @@ define([ reader.readAsText(blob); }; Thumb.fromBlob = function (blob, _cb) { - var cb = Util.once(_cb); + var cb = Util.once(Util.mkAsync(_cb)); // The blob is already in memory, it should be super-fast to make a thumbnail // ==> 1s timeout setTimeout(function () {