pixelmund / svelte-kit-cookie-session

⚒️ Encrypted "stateless" cookie sessions for SvelteKit
MIT License
184 stars 12 forks source link

TypeError: 'set' on proxy: trap returned falsish for property 'destroy' fired on session deletion in production mode #2

Closed jack-y closed 3 years ago

jack-y commented 3 years ago

First of all, thank you for this amazing svelte-kit-cookie-session package! When I use it in dev mode, everything works perfectly. But when I build my app and start it, the session deletion fires this error message:

TypeError: 'set' on proxy: trap returned falsish for property 'destroy'

After some testing I found the location of the error in initialize.ts line 104:

if (sessionCookie.length === 0) return false;

Setting the return value to true resolves the issue.