mirror of
https://github.com/iconify/iconify.git
synced 2024-11-09 14:50:56 +00:00
chore: log errors in loader in utils
This commit is contained in:
parent
ce9c10c9f5
commit
957a9eda66
@ -29,7 +29,11 @@ export async function getCustomIcon(
|
|||||||
const inline = custom[icon];
|
const inline = custom[icon];
|
||||||
result = typeof inline === 'function' ? await inline() : inline;
|
result = typeof inline === 'function' ? await inline() : inline;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.warn(
|
||||||
|
`Failed to load custom icon "${icon}" in "${collection}":`,
|
||||||
|
err
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,11 @@ export const loadIcon: UniversalIconLoader = async (
|
|||||||
let result: string | IconifyJSON | undefined;
|
let result: string | IconifyJSON | undefined;
|
||||||
try {
|
try {
|
||||||
result = await custom(icon);
|
result = await custom(icon);
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.warn(
|
||||||
|
`Failed to load custom icon "${icon}" in "${collection}":`,
|
||||||
|
err
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user