Skip to content

Commit ca586f4

Browse files
committed
fix wrong method call
1 parent 11dda25 commit ca586f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/only_include_used_icons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ import type { Equals } from "tsafe";
158158
...(() => {
159159
const dsfrDistInPublic = pathJoin(cwd, "public", "dsfr");
160160

161-
return fs.readdirSync(dsfrDistInPublic) && [dsfrDistInPublic];
161+
return fs.existsSync(dsfrDistInPublic) ? [dsfrDistInPublic] : [];
162162
})()
163163
].forEach(async dsfrDistDirPath => {
164164
const remixiconDirPath = pathJoin(dsfrDistDirPath, "icons", "remixicon");

0 commit comments

Comments
 (0)