fix(banners): 🐛 iconify's icon name resolution

This commit is contained in:
Guz013
2023-06-26 16:02:51 -03:00
parent 5b5505612b
commit 376c49e8c9

View File

@@ -86,13 +86,7 @@ export function setIconDimensions(svg, { width, height }) {
* @access package
*/
function isIconName(string) {
try {
const [collection, icon] = string.split(':');
return Boolean(collection) && Boolean(icon);
}
catch (_) {
return false;
}
return /^[a-z0-9-]+:[a-z0-9-]+(\[\])?$/.test(string);
}
/**