Skip to content

Commit

Permalink
fix: throw outside try (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Bodin committed Jul 12, 2021
1 parent d34bcc1 commit d36a77a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,12 @@ async function loop(
return;
}

if (change.deleted) {
// Delete package directly in index
// Filter does not support async/await but there is no concurrency issue with this
throw new Error('deleted');
}

try {
if (change.deleted) {
// Delete package directly in index
// Filter does not support async/await but there is no concurrency issue with this
throw new Error('deleted');
}
const res = await npm.getDoc(change.id, change.changes[0].rev);

if (isFailure(res)) {
Expand Down

0 comments on commit d36a77a

Please sign in to comment.