Before to this patch, calling splice on an Automerge list with a
deleteCount that overflows the list results in a RangeError.
However, according to Mozilla's documentation (and tested on Node
v14.15.4), splice's deleteCount argument can be equal or greater than
the list. In that case, all the elements from start to the end of the
array should be deleted.
With this patch, deleteCount can overflow the list's length and the
behaviour is like no deleteCount was passed.
Before to this patch, calling
splice
on an Automerge list with a deleteCount that overflows the list results in a RangeError.However, according to Mozilla's documentation (and tested on Node v14.15.4), splice's
deleteCount
argument can be equal or greater than the list. In that case, all the elements from start to the end of the array should be deleted.With this patch, deleteCount can overflow the list's length and the behaviour is like no deleteCount was passed.