Skip to content

Commit 9576aa5

Browse files
authored
Merge pull request #12 from dabutvin/no-components
exit early if no components found
2 parents f98858f + e61bf59 commit 9576aa5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ async function go() {
4040
`npm/npmjs/${x.name}/${x.version}` :
4141
`npm/npmjs/-/${x.name}/${x.version}`
4242
)
43+
if (!coordinates.length) {
44+
console.log('no components detected')
45+
return
46+
}
4347
const clearlydefinedSource = new ClearlyDefinedSource(JSON.stringify({
4448
coordinates
4549
}))

0 commit comments

Comments
 (0)