Skip to content

Commit d36a77a

Browse files
author
Samuel Bodin
authored
fix: throw outside try (#661)
1 parent d34bcc1 commit d36a77a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/watch.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,12 @@ async function loop(
109109
return;
110110
}
111111

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

121120
if (isFailure(res)) {

0 commit comments

Comments
 (0)