persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
The function was broken in a way that when it actually removed an item from
the array, it would run over the end of the array, throwing an exception
trying to work with a null element. Fixed by returning directly after
deleting an element. This is OK since the method is only used for arrays
without duplicate elements.
Also added a test case that uses arrayRemove() (indirectly).
The function was broken in a way that when it actually removed an item from the array, it would run over the end of the array, throwing an exception trying to work with a null element. Fixed by returning directly after deleting an element. This is OK since the method is only used for arrays without duplicate elements.
Also added a test case that uses arrayRemove() (indirectly).