fix: Library icon name bug (#1934)

This commit is contained in:
Muppetteer
2025-12-19 10:58:42 -07:00
committed by GitHub
parent cc76501fd0
commit 0767f75ddb
@@ -68,7 +68,8 @@ export class LibraryCreatorComponent implements OnInit {
if (iconType === 'CUSTOM_SVG') {
this.selectedIcon = {type: 'CUSTOM_SVG', value: icon};
} else {
this.selectedIcon = {type: 'PRIME_NG', value: `pi pi-${icon}`};
const value = icon.slice(0, 6) === 'pi pi-' ? icon : `pi pi-${icon}`;
this.selectedIcon = {type: 'PRIME_NG', value: value};
}
this.watch = watch;