Warn if icon not found
This commit is contained in:
parent
848433365d
commit
d25c2df392
1 changed files with 5 additions and 0 deletions
|
@ -146,6 +146,11 @@ function Icon({
|
||||||
|
|
||||||
const iconSize = SIZES[size];
|
const iconSize = SIZES[size];
|
||||||
let iconBlock = ICONS[icon];
|
let iconBlock = ICONS[icon];
|
||||||
|
if (!iconBlock) {
|
||||||
|
console.warn(`Icon ${icon} not found`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let rotate, flip;
|
let rotate, flip;
|
||||||
if (Array.isArray(iconBlock)) {
|
if (Array.isArray(iconBlock)) {
|
||||||
[iconBlock, rotate, flip] = iconBlock;
|
[iconBlock, rotate, flip] = iconBlock;
|
||||||
|
|
Loading…
Add table
Reference in a new issue