Skip to content

fix: repeat must not mutate its result object in place (#785) #787

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

webstrand
Copy link
Contributor

Fixes #785

This substantially rewrites repeat to be more straight-forward with fewer closures, unlike #786 which is more conservative.

Copy link

changeset-bot bot commented Apr 20, 2025

🦋 Changeset detected

Latest commit: 52e6854

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

This PR includes changesets to release 1 package
Name Type
@solid-primitives/range 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

@webstrand
Copy link
Contributor Author

This is actually kind of broken still, if the array returned from repeat()() is mutated, internal state can be corrupted

@thetarnav
Copy link
Member

That’s fine
The same probably happens with mapArray and others
When mutating the result one should copy
Nothing broken with that

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.

<Repeat/> does not update when its times.prop changes
2 participants