Differentiate download and decryption errors when showing images (#9562)

This commit is contained in:
Michael Telatynski 2022-11-10 09:27:20 +00:00 committed by GitHub
parent abec724387
commit 962e8e0b23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 170 additions and 133 deletions

View file

@ -48,12 +48,10 @@ export class LazyValue<T> {
if (this.prom) return this.prom;
this.prom = this.getFn();
// Fork the promise chain to avoid accidentally making it return undefined always.
this.prom.then(v => {
return this.prom.then(v => {
this.val = v;
this.done = true;
return v;
});
return this.prom;
}
}