elysiajs / elysia

Ergonomic Framework for Humans
https://elysiajs.com
MIT License
9.23k stars 198 forks source link

async derive does not get awaited #588

Open lithdew opened 3 months ago

lithdew commented 3 months ago

What version of Elysia.JS is running?

1.0.11

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

export async function deriveSession({ cookie }: Context<any>) {
  return { session: "123" };
}

Use the derive() above as .derive(deriveSession). The field session is undefined in all handlers.

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

SaltyAom commented 3 months ago

Patched on 1.0.14, please update and let me know if it works