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

Get context at start of if update block instead of at the end #5531

Merged
merged 2 commits into from
Oct 22, 2020

Conversation

jesseskinner
Copy link
Contributor

@jesseskinner jesseskinner commented Oct 15, 2020

I changed push to unshift, so that inside the update method of the await then block, it gets the context before proceeding into the if block, instead of afterwards.

This didn't break any existing tests, but I'm unsure if there are any negative implications of doing this I'm unaware of.

Fixes #5508

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@jesseskinner jesseskinner changed the title Fix for Issue 5508, get context at start of if update block instead of at the end Fix for Issue #5508, get context at start of if update block instead of at the end Oct 15, 2020
@jesseskinner jesseskinner changed the title Fix for Issue #5508, get context at start of if update block instead of at the end Get context at start of if update block instead of at the end Oct 15, 2020
@Conduitry Conduitry merged commit a4e4bd0 into sveltejs:master Oct 22, 2020
hontas added a commit to hontas/svelte that referenced this pull request Oct 29, 2020
* upstream/master: (140 commits)
  support $$props and $$restProps for custom elements (sveltejs#5608)
  Bump eslint-config to 5.5.0 (sveltejs#5599)
  update changelog
  add Node and Element as known globals (sveltejs#5601)
  docs: fix a11y warning in media elements example (sveltejs#5606)
  Curly braces linting fixes (sveltejs#5585)
  refactor sourcemap and preprocessor tests (sveltejs#5583)
  -> v3.29.4
  fix code generation error with nullish coalescing operator and logical operators (sveltejs#5564)
  -> v3.29.3
  -> v3.29.2
  -> v3.29.1
  docs: fix a11y warning in media elements tutorial (sveltejs#5523)
  update changelog
  get context at start of {#if} update block instead of at the end (sveltejs#5531)
  update changelog
  only allow passing functions to lifecycle functions (sveltejs#5529)
  update changelog
  fix compiler hanging on <slot slot="..."> (sveltejs#5536)
  Add svelte@next caveat to bug report template (sveltejs#5561)
  ...
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

Successfully merging this pull request may close these issues.

Destructured promise result in {#await} becomes undefined during re-render
2 participants