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

Sort order consistent and starting from 0 #552

Merged
merged 1 commit into from
Aug 18, 2014
Merged

Sort order consistent and starting from 0 #552

merged 1 commit into from
Aug 18, 2014

Conversation

albertogasparin
Copy link
Contributor

The Admin UI sorts the elements from index 0; instead, the middleware expects 1+ indexes. So, if you update the first item in the list, the lazy if statement changes sortOrder to the max + 1.
Adding a type check should fix this wrong behaviour and make the index 0 based across the board.

@JedWatson
Copy link
Member

Thanks @albertogasparin, glad you caught this.

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.

2 participants