Skip to content
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

{#await} with function returning a promise and state update inside #2355

Closed
PaulMaly opened this issue Apr 3, 2019 · 6 comments
Closed

{#await} with function returning a promise and state update inside #2355

PaulMaly opened this issue Apr 3, 2019 · 6 comments
Labels

Comments

@PaulMaly
Copy link
Contributor

PaulMaly commented Apr 3, 2019

Actually, I'm not sure how exactly describe it)))

REPL

@Rich-Harris Rich-Harris added the bug label Apr 6, 2019
@Rich-Harris
Copy link
Member

This is happening because load() gets called on every update. It should only get called once since load never changes

@PaulMaly
Copy link
Contributor Author

PaulMaly commented May 7, 2019

@Rich-Harris Is this issue still actual?

@Rich-Harris
Copy link
Member

It's still an issue, yeah — not just restricted to await blocks. Here's a repro of a similar issue from @njbotkin https://svelte.dev/repl/632519a45a454e5eb3dd091655a98fed?version=3.7.1

Rich-Harris added a commit that referenced this issue Aug 22, 2019
more conservative if block updates
@njbotkin
Copy link
Contributor

This is awesome, but svelte.dev/repl/632519a45a454e5eb3dd091655a98fed?version=3.9.1 (line 17) now gives an Unexpected token error for me? :(

@Conduitry
Copy link
Member

That looks like the same issue as #3447.

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

No branches or pull requests

4 participants