kopia lustrzana https://github.com/cheeaun/phanpy
Warn if icon not found
rodzic
848433365d
commit
d25c2df392
|
@ -146,6 +146,11 @@ function Icon({
|
|||
|
||||
const iconSize = SIZES[size];
|
||||
let iconBlock = ICONS[icon];
|
||||
if (!iconBlock) {
|
||||
console.warn(`Icon ${icon} not found`);
|
||||
return null;
|
||||
}
|
||||
|
||||
let rotate, flip;
|
||||
if (Array.isArray(iconBlock)) {
|
||||
[iconBlock, rotate, flip] = iconBlock;
|
||||
|
|
Ładowanie…
Reference in New Issue