guarantee async behaviour when creating thumbnails

This commit is contained in:
ansuz 2021-09-01 18:08:03 +05:30
parent 2799a69b3a
commit 86f23dcfc0

View file

@ -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 () {