kbrgl / svelte-french-toast

🍞🥂 Buttery smooth toast notifications for Svelte
https://svelte-french-toast.vercel.app/
MIT License
809 stars 28 forks source link

Cannot read properties of undefined (reading 'push') #55

Closed fell-lucas closed 8 months ago

fell-lucas commented 10 months ago

Hi! When running the server, this bunch of error logs show up:

image

However, when I wrap <Toaster /> with an if browser from SvelteKit, the error stops happening:

image

browser is imported from '$app/environment'

Just opening the issue here in case there are some other people out there that are also experiencing this.

Thanks for this amazing library! We've been using for a few months now and it's been great.

kbrgl commented 10 months ago

Hey Lucas! Thanks for the report. If possible, could you provide a minimal reproduction? Going to leave this issue open in case others run into it.

fell-lucas commented 9 months ago

Hi, sorry for the delay. I've removed the if browser statement and will be keeping an eye on the logs to check if it happens again. If I recall correctly, even when throwing this error, the toast was still being shown, so it wasn't a major issue or anything.

If something happens I'll update here, but feel free to close the issue.