diff --git a/lib/handler/RetryHandler.js b/lib/handler/RetryHandler.js index 37aca5911a4..de4463b6b9c 100644 --- a/lib/handler/RetryHandler.js +++ b/lib/handler/RetryHandler.js @@ -183,12 +183,12 @@ class RetryHandler { return true } - let contentRange + const contentRange = parseRangeHeader(headers['content-range']) if ( // Let's start with a weak etag check (this.etag != null && this.etag !== headers.etag) || // If no content range - !(contentRange = parseRangeHeader(headers['content-range'])) + !contentRange ) { this.abort(err) return false