@jaypie/express 1.2.4-rc21 → 1.2.4-rc22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -1534,6 +1534,8 @@ function safeSendJson(res, statusCode, data) {
|
|
|
1534
1534
|
const chunk = Buffer.from(JSON.stringify(data));
|
|
1535
1535
|
res._chunks.push(chunk);
|
|
1536
1536
|
res._headersSent = true;
|
|
1537
|
+
// Mark as ended so getResult() resolves immediately
|
|
1538
|
+
res._ended = true;
|
|
1537
1539
|
// Signal completion if a promise is waiting
|
|
1538
1540
|
if (res._resolve) {
|
|
1539
1541
|
res._resolve(res.buildResult());
|
|
@@ -1560,6 +1562,8 @@ function safeSend(res, statusCode, body) {
|
|
|
1560
1562
|
res._chunks.push(chunk);
|
|
1561
1563
|
}
|
|
1562
1564
|
res._headersSent = true;
|
|
1565
|
+
// Mark as ended so getResult() resolves immediately
|
|
1566
|
+
res._ended = true;
|
|
1563
1567
|
// Signal completion if a promise is waiting
|
|
1564
1568
|
if (res._resolve) {
|
|
1565
1569
|
res._resolve(res.buildResult());
|