HomePhabricator

ve.dm.TransactionProcessor: Fix edge case handling, avoid ES6 methods

Description

ve.dm.TransactionProcessor: Fix edge case handling, avoid ES6 methods

End the correct annotation when encountering a bias=='stop' operation.
Previously, we always ended the first annotation (the index variable
actually contained the value, not the index, which was casted to 0).
It did not matter in practice because it seems that the editor always
generates transactions with only one annotation changed in each, but
that may change (there is a relevant TODO in AnnotationAction#clearAll).

Updated a test to exercise this code. It would fail without this patch.

Also, do not use the ES6 Array#find method. It is not available in all
browsers we support, e.g. IE 11.

Bug: T200455
Change-Id: Ic1971549da37091c41a847229d18e95aff5c9952

Details

Provenance
matmarexAuthored on Jul 30 2018, 6:56 PM
Parents
rGVEDe0f344c72276: Merge "Make mode for getting document data without metadata"
Branches
Unknown
Tags
Unknown
ChangeId
Ic1971549da37091c41a847229d18e95aff5c9952