Skip to content

Fix column slicing behavior on recipes page - #406

Open
svbarker wants to merge 1 commit into
CraftingAsAService:mainfrom
svbarker:list-order
Open

Fix column slicing behavior on recipes page#406
svbarker wants to merge 1 commit into
CraftingAsAService:mainfrom
svbarker:list-order

Conversation

@svbarker

@svbarker svbarker commented Aug 7, 2026

Copy link
Copy Markdown

Hi, long time user of the site, first time contributor! I noticed that on the recipes page, I was seeing a column ordering of 1-3-2 instead of 1-2-3, and it turned out the fix was simple so I thought I'd throw up a PR. The splice method mutates the original array, so what was happening was:

  1. this.results.splice(0, split) - Remove and return the first third of the results array (column 1)
  2. this.results.splice(split, split + split) - Remove and return the back half of what remains of the results array (what should have been column 3)
  3. this.results.splice(-split) - this.results is now split items long, so take remove and return all of the rest of it (what should have been column 2)

I switched these to slice, which shallow-copies instead of mutating the original array, which I think is what was intended in the first place.

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.

1 participant