Skip to content
Snippets Groups Projects
Commit 4a2e93e2 authored by dsehnal's avatar dsehnal
Browse files

fix applyMarkerAction edge case

parent 55de0aba
No related branches found
No related tags found
No related merge requests found
......@@ -105,8 +105,13 @@ export function applyMarkerAction(array: Uint8Array, set: OrderedSet, action: Ma
applyMarkerActionAtPosition(array, i, action);
}
for (let i = backStart; i < backEnd; ++i) {
applyMarkerActionAtPosition(array, i, action);
// to prevent applying "toggle" twice check for edge case where
// viewEnd <= viewStart, which resolves to the "front" and "back"
// intervals being the same range
if (frontStart !== backStart) {
for (let i = backStart; i < backEnd; ++i) {
applyMarkerActionAtPosition(array, i, action);
}
}
} else {
switch (action) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment