Skip to content

Commit

Permalink
chore: fix two codesmells
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Jan 30, 2024
1 parent 2144da4 commit 926b17e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/handler/RetryHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class RetryHandler {
let retryAfterHeader = headers != null && headers['retry-after']
if (retryAfterHeader) {
retryAfterHeader = Number(retryAfterHeader)
retryAfterHeader = isNaN(retryAfterHeader)
retryAfterHeader = Number.isNaN(retryAfterHeader)
? calculateRetryAfterHeader(retryAfterHeader)
: retryAfterHeader * 1e3 // Retry-After is in seconds
}
Expand Down
4 changes: 1 addition & 3 deletions lib/websocket/receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,7 @@ class ByteParser extends Writable {
}
}

if (this.#byteOffset > 0) {
continue
} else {
if (this.#byteOffset === 0) {
callback()
break
}
Expand Down

0 comments on commit 926b17e

Please sign in to comment.