flekschas / svelte-simple-modal

A simple, small, and content-agnostic modal for Svelte v3 and v4

Home Page:https://svelte.dev/repl/b95ce66b0ef34064a34afc5c0249f313

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudflare Adapter Exception

DrewRidley opened this issue · comments

__layout.svelte-7b3f1eda.js:formatted:751 Uncaught (in promise) TypeError: Cannot destructure property 'open' of 'C(...)' as it is undefined.
    at ns (__layout.svelte-7b3f1eda.js:formatted:751)
    at Pt (vendor-f4e5e978.js:1)
    at new is (__layout.svelte-7b3f1eda.js:formatted:778)
    at Array.ds (__layout.svelte-7b3f1eda.js:formatted:806)
    at vs (__layout.svelte-7b3f1eda.js:formatted:1144)
    at Pt (vendor-f4e5e978.js:1)
    at new default (__layout.svelte-7b3f1eda.js:formatted:1460)
    at M (start-a2f5bb3a.js:1)
    at Pt (vendor-f4e5e978.js:1)
    at new z (start-a2f5bb3a.js:1)

Hello, it appears the library does not run correctly when using the cloudflare-worker adapter. Unfortunately, svelte-simple-modal does not properly register its context in this scenario, and as a result attempting to use getContext('simple-modal') throws an exception. Any help would be much appreciated.

Without further context and a reproducable example I am not able to help out.

I am closing the issue as I am not sure how to help out here. If you have a reproducable example please reopen the issue.