@@ -105,7 +105,7 @@ export class IgxIconService {
105105 * this.iconService.addSvgIcon('aruba', '/assets/svg/country_flags/aruba.svg', 'svg-flags');
106106 * ```
107107 */
108- public addSvgIcon ( name : string , url : string , family : string = '' ) {
108+ public addSvgIcon ( name : string , url : string , family = this . _family ) {
109109 if ( name && url ) {
110110 const safeUrl = this . _sanitizer . bypassSecurityTrustResourceUrl ( url ) ;
111111 if ( ! safeUrl ) {
@@ -154,8 +154,9 @@ export class IgxIconService {
154154 * ```
155155 */
156156 public isSvgIconCached ( name : string , family : string = '' ) : boolean {
157- if ( this . _cachedSvgIcons . has ( family ) ) {
158- const familyRegistry = this . _cachedSvgIcons . get ( family ) as Map < string , SafeHtml > ;
157+ const familyClassName = this . familyClassName ( family ) ;
158+ if ( this . _cachedSvgIcons . has ( familyClassName ) ) {
159+ const familyRegistry = this . _cachedSvgIcons . get ( familyClassName ) as Map < string , SafeHtml > ;
159160 return familyRegistry . has ( name ) ;
160161 }
161162
@@ -169,7 +170,8 @@ export class IgxIconService {
169170 * ```
170171 */
171172 public getSvgIcon ( name : string , family : string = '' ) {
172- return this . _cachedSvgIcons . get ( family ) ?. get ( name ) ;
173+ const familyClassName = this . familyClassName ( family ) ;
174+ return this . _cachedSvgIcons . get ( familyClassName ) ?. get ( name ) ;
173175 }
174176
175177 /**
0 commit comments