Skip to content

Indexed / Element Parcel fixes

Compare
Choose a tag to compare
@dxinteractive dxinteractive released this 24 Jul 04:56
· 938 commits to master since this release
  • Fixed bug where actions would add their index to their actions keypath if get() was called called with an index, which would cause actions to take place on wrong elements if async actions were used with something like Parcel.toArray()
  • Fixed bug where Parcel.batch() would run actions more than once in some cases, which posed a problem for non-idempotent actions
  • Fix bug where calling Parcel.delete() with a non existent key would delete the last element in the array
  • Better defined out of bounds and "key not found" behaviour for Parcel.swapNext(), Parcel.swapPrev(), Parcel.insertBefore() and Parcel.insertAfter().
    • If the key is not found, these do nothing, and no longer throw an error
    • If the index is >= length, or < negative length, the index will be wrapped
      • This behaviour may change in future, but for now it is at least defined
      • e.g ["A","B","C"] ... delete(3) would wrap around and delete "A"
  • No breaking changes