Differentiate download and decryption errors when showing images (#9562)
This commit is contained in:
parent
abec724387
commit
962e8e0b23
7 changed files with 170 additions and 133 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue