Skip to content

Commit 1eb0c29

Browse files
Fix returning of empty dir
Instead of throwing, return an empty list of components
1 parent 89de930 commit 1eb0c29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/registry/domain/components-cache/components-list.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export default function componentsList(conf: Config, cdn: StorageAdapter) {
4646
};
4747
} catch (err: any) {
4848
if (err.code === 'dir_not_found') {
49-
throw {
49+
return {
5050
lastEdit: getUnixUTCTimestamp(),
51-
components: [] as any
51+
components: {}
5252
};
5353
}
5454
throw err;

0 commit comments

Comments
 (0)