Skip to content

Commit

Permalink
fix security vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-tatar committed Mar 29, 2022
1 parent 298d0b5 commit 8e12e48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/nora/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ export class FirebaseSync {
},
body: body ? JSON.stringify(body) : undefined,
});
if (response.status !== 200) {
if (!response.ok) {
const shouldRetry = this.shouldRetryRequest(response);
if (!shouldRetry || !tries) {
throw new HttpError(response.status, await response.text());
}
const delay = Math.round(Math.random() * 20) * 50 + 300;
const delay = Math.round(Math.random() * 20) * 100 + 300;
await new Promise(resolve => setTimeout(resolve, delay));
continue;
}
Expand Down

0 comments on commit 8e12e48

Please sign in to comment.