We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
data
1 parent be6bfb3 commit ade2773Copy full SHA for ade2773
1 file changed
src/utils/session.ts
@@ -48,7 +48,7 @@ export async function useSession<T extends SessionDataT = SessionDataT>(
48
return event.context.sessions?.[sessionName]?.id;
49
},
50
get data() {
51
- return event.context.sessions?.[sessionName]?.data || {};
+ return (event.context.sessions?.[sessionName]?.data || {}) as T;
52
53
update: async (update: SessionUpdate<T>) => {
54
await updateSession<T>(event, config, update);
0 commit comments