2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-04 18:23:17 +00:00

fix: when options?.cwd is undefined

This commit is contained in:
_Kerman 2024-07-18 10:28:21 +08:00
parent 500ef6793e
commit aba9770517

View File

@ -15,11 +15,7 @@ export const loadNodeIcon: UniversalIconLoader = async (
return result;
}
const cwds = options?.cwd
? Array.isArray(options.cwd)
? options.cwd
: [options.cwd]
: [];
const cwds = Array.isArray(options?.cwd) ? options.cwd : [options?.cwd];
for (const cwd of cwds) {
const iconSet = await loadCollectionFromFS(