mirror of
https://github.com/denoland/deno.git
synced 2025-01-08 07:08:27 -05:00
fix(ext/http): merge identical if/else branches (#12269)
This commit is contained in:
parent
91f9931bb5
commit
dbf2f5ff10
1 changed files with 3 additions and 5 deletions
|
@ -70,11 +70,9 @@
|
||||||
// a generic `BadResource` error. Instead store this error and replace
|
// a generic `BadResource` error. Instead store this error and replace
|
||||||
// those with it.
|
// those with it.
|
||||||
this[connErrorSymbol] = error;
|
this[connErrorSymbol] = error;
|
||||||
if (error instanceof BadResource) {
|
if (
|
||||||
return null;
|
error instanceof BadResource ||
|
||||||
} else if (error instanceof Interrupted) {
|
error instanceof Interrupted ||
|
||||||
return null;
|
|
||||||
} else if (
|
|
||||||
StringPrototypeIncludes(error.message, "connection closed")
|
StringPrototypeIncludes(error.message, "connection closed")
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue