Skip to content

Commit

Permalink
Merge pull request #165 from mariovyord/fix/icon-can-be-reloaded-afte…
Browse files Browse the repository at this point in the history
…r-fail

fix: enable icon reloading after fetch fail
  • Loading branch information
czeckd authored Dec 6, 2024
2 parents aaf812d + 929f57d commit 0138b54
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ export class SvgIconRegistryService {
div.innerHTML = svg;
return div.querySelector('svg') as SVGElement;
}),
tap (svg => this.iconsByUrl.set(name, svg) ),
tap(svg => {
this.iconsByUrl.set(name, svg);
this.iconsLoadingByUrl.delete(name);
}),
catchError(err => {
console.error(err);
return observableThrowError(err);
}),
finalize(() => this.iconsLoadingByUrl.delete(name) ),
share()
) as Observable<SVGElement>;

Expand Down

0 comments on commit 0138b54

Please sign in to comment.