Skip to content

fix(store): fix traversed returning duplicate values - #843

Merged
ryansolid merged 1 commit into
solidjs:mainfrom
otonashixav:fix-set-store-traversed
Feb 10, 2022
Merged

ryansolid merged 1 commit into
solidjs:mainfrom
otonashixav:fix-set-store-traversed

Conversation

@otonashixav

@otonashixav otonashixav commented Feb 9, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #840

Also made the type of traversed reflect the keys traversed e.g. Will make a PR after the other store type PRs are done

setStore("list", [0, 1], (v, traversed) => {
  traversed[0]; // <-- number
  traversed[1]; // <-- "list"
})

@coveralls

coveralls commented Feb 9, 2022 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 1819680927

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.005%) to 89.447%

Totals Coverage Status
Change from base Build 1811033532: -0.005%
Covered Lines: 1201
Relevant Lines: 1282

💛 - Coveralls

@otonashixav
otonashixav marked this pull request as draft February 9, 2022 18:27
@otonashixav

otonashixav commented Feb 9, 2022 •

Copy link
Copy Markdown
Contributor Author

I left #824 in this by accident, going to just keep it to fixing traversed and leave the types to later

Edit: done

@otonashixav
otonashixav force-pushed the fix-set-store-traversed branch from 1e5569c to 5a89487 Compare February 9, 2022 18:35
@otonashixav
otonashixav force-pushed the fix-set-store-traversed branch from 5a89487 to 43a5113 Compare February 9, 2022 18:37
@otonashixav
otonashixav marked this pull request as ready for review February 9, 2022 18:37
@ryansolid

Copy link
Copy Markdown
Member

Thanks. Looks good.

@ryansolid
ryansolid merged commit 5dd90c4 into solidjs:main Feb 10, 2022
@otonashixav
otonashixav deleted the fix-set-store-traversed branch March 15, 2022 18:44
lilybw pushed a commit to lilybw/solid that referenced this pull request Nov 12, 2025
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.

traversed in setStore duplicates traversed keys when passed an array, function or object

3 participants