Skip to content

Commit 55b86f0

Browse files
committed
🔧 fix: clone hook
1 parent 8c4634a commit 55b86f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@elysiajs/swagger",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "Plugin for Elysia to auto-generate Swagger page",
55
"author": {
66
"name": "saltyAom",

src/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ export const registerSchemaPath = ({
124124
hook?: LocalHook<any, any, any, any, any, any, any>
125125
models: Record<string, TSchema>
126126
}) => {
127+
hook = cloneHook(hook)
128+
127129
const contentType = hook?.type ?? [
128130
'application/json',
129131
'multipart/form-data',

0 commit comments

Comments
 (0)