Check if the worker is available when focusing a tab again

This commit is contained in:
yflory
2020-03-11 16:24:39 +01:00
parent 21c3abde6f
commit 718cdee907
3 changed files with 26 additions and 3 deletions

View File

@@ -79,7 +79,10 @@ define([
var metaObj;
nThen(function (waitFor) {
Cryptpad.getMetadata(waitFor(function (err, n) {
if (err) { console.log(err); }
if (err) {
waitFor.abort();
return void console.log(err);
}
metaObj = n;
}));
}).nThen(function (/*waitFor*/) {