adding more sanity checkss to yarray.tests

This commit is contained in:
Kevin Jahns
2021-12-07 12:36:42 +01:00
parent bd47efe0ee
commit 3d31ba8759
7 changed files with 140 additions and 19 deletions

View File

@@ -308,6 +308,7 @@ export const mergeUpdatesV2 = (updates, YDecoder = UpdateDecoderV2, YEncoder = U
// Note: Should handle that some operations cannot be applied yet ()
while (true) {
// @todo this incurs an exponential overhead. We could instead only sort the item that changed.
// Write higher clients first ⇒ sort by clientID & clock and remove decoders without content
lazyStructDecoders = lazyStructDecoders.filter(dec => dec.curr !== null)
lazyStructDecoders.sort(