Open folland87 opened 1 month ago
1.1.3
Linux 6.5.0-44-generic x86_64 x86_64
import { Elysia } from "elysia"; const app = new Elysia() .derive(({ error, cookie: { accessToken } }) => { if (!accessToken) { return { isConnected: true }; } return { currentUser: false }; }) .get("/hello", async ({ currentUser, error }) => { if (currentUser) { return { message: "world" }; } return error(401, { message: "Error" }); }) .listen(3000); console.log( `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`, );
Destructure accessToken as in 1.0.*
{"name":"TypeError","message":"Right side of assignment cannot be destructured"}
No response
i have this error too after updating elysia
What version of Elysia.JS is running?
1.1.3
What platform is your computer?
Linux 6.5.0-44-generic x86_64 x86_64
What steps can reproduce the bug?
What is the expected behavior?
Destructure accessToken as in 1.0.*
What do you see instead?
{"name":"TypeError","message":"Right side of assignment cannot be destructured"}
Additional information
No response