mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
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];
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue