Skip to content

Commit 4d6f5dd

Browse files
committed
🔧 fix: #1346 cannot declare 'mep' twice
1 parent d078afd commit 4d6f5dd

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.github/ISSUE_TEMPLATE/2-bug-report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body:
2929
attributes:
3030
label: What environment are you using
3131
description: |
32+
Answer with runtime and version you are using.
3233
- Bun version: `bun --version`
3334
- Node version: `node --version`
3435
- Deno version: `deno --version`

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.3.11 - 18 Aug 2025
2+
Bug fix:
3+
- [#1346](https://github.com/elysiajs/elysia/issues/1346) cannot declare 'mep' twice
4+
15
# 1.3.10 - 18 Aug 2025
26
Bug fix:
37
- [#1028](https://github.com/elysiajs/elysia/issues/1028) query array nuqs format in dynamic mode

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "elysia",
33
"description": "Ergonomic Framework for Human",
4-
"version": "1.3.10",
4+
"version": "1.3.11",
55
"author": {
66
"name": "saltyAom",
77
"url": "https://github.com/SaltyAom",

src/compose.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,6 +1969,8 @@ export const composeHandler = ({
19691969
else fnLiteral += `c.code=error.code??error[ERROR_CODE]??"UNKNOWN"\n`
19701970

19711971
fnLiteral += `let er\n`
1972+
// Mapped error Response
1973+
if (hooks.mapResponse?.length) fnLiteral += 'let mep\n'
19721974

19731975
for (let i = 0; i < hooks.error.length; i++) {
19741976
const endUnit = errorReporter.resolveChild(hooks.error[i].fn.name)
@@ -1987,9 +1989,6 @@ export const composeHandler = ({
19871989
total: hooks.mapResponse?.length
19881990
})
19891991

1990-
// Mapped error Response
1991-
fnLiteral += 'let mep\n'
1992-
19931992
for (let i = 0; i < hooks.mapResponse.length; i++) {
19941993
const mapResponse = hooks.mapResponse[i]
19951994

0 commit comments

Comments
 (0)