JedWatson/keystone — pull request #552 by albertogasparin (2014-08-18 16:58:57+00:00)
Title: Sort order consistent and starting from 0

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.