Skip to content

Commit

Permalink
fix(icons): loader does not exist is displayed in case of undefined (#…
Browse files Browse the repository at this point in the history
…2814)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
TalexDreamSoul and antfu committed Jul 8, 2023
1 parent f131ee6 commit 7daa253
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/preset-icons/src/core.ts
Expand Up @@ -124,6 +124,8 @@ export function createPresetIcons(lookupIconLoader: (options: IconsOptions) => P
export function combineLoaders(loaders: UniversalIconLoader[]) {
return (async (...args) => {
for (const loader of loaders) {
if (!loader)
continue
const result = await loader(...args)
if (result)
return result
Expand Down

0 comments on commit 7daa253

Please sign in to comment.