Skip to content

getContext does not work through {#await} #3344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spiffytech opened this issue Aug 3, 2019 · 1 comment
Closed

getContext does not work through {#await} #3344

spiffytech opened this issue Aug 3, 2019 · 1 comment

Comments

@spiffytech
Copy link

Describe the bug
Attempting to getContext in a component that's rendered inside an {#await} block returns undefined, instead of the context value.

To Reproduce
https://svelte.dev/repl/018e3f0afffd41edb87b6c3dc5b38d62?version=3.6.10

Expected behavior
I expect getContext to always return the context value, regardless of how the component gets rendered.

Information about your Svelte project:

  • Your browser and the version: Chrome 75, Firefox

  • Your operating system: Chrome OS

  • Svelte version: Svelte 3.6.7, 3.6.10

  • Webpack, REPL

Severity
I'm trying to pass stores around. Luckily, I can import the stores directly, but since my whole app is rendered inside an {#await} block, this probably blocks all of setContext/getContext for me until it's fixed or I find a workaround.

@Conduitry
Copy link
Member

Duplicate of #2443.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants