Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Feb 16, 2024

fixes #10473

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2024

🦋 Changeset detected

Latest commit: 7c7f2cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-kit-so-good
Copy link

Hey @trueadm so that I don't needlessly open another issue, I'm wondering what was fixed in the sample code I provided?

For instance "Version 2" code:

{#each iframeModals as _, i}
	<IframeModal bind:iframe={iframeModals[i]} />
{/each}

was the work around I already implemented before opening the now closed issue 10437.

Version 1 code:

{#each iframeModals as iframe}
	<IframeModal bind:iframe />
{/each}

throws a compiler error since @dummdidumm made the change in regards to 10437.

My actual issue is still with "Version 3" code:

{#each iframeModals as iframe}
	<IframeModal {iframe} delay={500} />
{/each}

which still does not work as intended when upgrading to alpha 56; namely it's this code snippet that breaks on pnpm dev but does work with pnpm build and deployment. So this bug isn't as bad as the deployment one associated with "Version 1" code ... but nonetheless it behaves differently between dev and prod.

In the provided repro I also include a "Version 4" which moves everything to a component, where internally it uses the #each block .. and there are no issues.

@dummdidumm
Copy link
Member

Can you open a new issue with a repl link that reproduces the issue? (It's ok if you say "this is the link, this works in the repl but if I run this locally with pnpm dev it doesn't work). It's really hard to decipher from that issue what the steps are to reproduce this.

@svelte-kit-so-good
Copy link

@dummdidumm ok opened 10508

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.

Svelte 5: #each block behaving differently with pnpm dev vs pnpm build

4 participants