arkon / ng-inline-svg

[Inactive] Angular directive for inserting an SVG file inline within an element.
https://echeung.me/ng-inline-svg/
MIT License
210 stars 88 forks source link

fix misusing of rxjs catchError in svg cache service #78

Closed martinbu closed 6 years ago

martinbu commented 6 years ago

ng-inline-svg v7.0.0 throws an unhandeled exception if a given svg is not available.

This is because the rxjs catchError operator expects an Observable as return type RxDocs#catchError. In the actual code the error object is returned instead of an observable.

This PR removes the catchError operator from the svg cache service because errors of svg-cache-service.getSVG() gets already handeled correctly in the subscription in inline-svg.directives.ts

arkon commented 6 years ago

Whoops, thanks!