diff --git a/lib/woodland.js b/lib/woodland.js index 018dada..0f009aa 100644 --- a/lib/woodland.js +++ b/lib/woodland.js @@ -282,7 +282,7 @@ class Woodland { if (obj.done === false) { if (err !== void 0) { - while (obj.value.length < 4 && obj.done === false) { + while (obj.done === false && obj.value.length < 4) { obj = middleware.next(); } diff --git a/package-lock.json b/package-lock.json index 0c8d3b0..9f78f55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "woodland", - "version": "5.0.13", + "version": "5.0.14", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index df45d17..e932fda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woodland", - "version": "5.0.13", + "version": "5.0.14", "description": "Lightweight HTTP/HTTPS/HTTP2 router with automatic `Allow` & `CORS` headers", "main": "index.js", "scripts": {