diff options
| author | Alon Levy <alon@pobox.com> | 2015-01-21 11:43:54 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-01-21 11:43:54 +0200 |
| commit | 71b93e579ec9d1975a0c534f62fc72675dbf7bd9 (patch) | |
| tree | 3e15db668cd81189b5d64f39f34ed2d98a87e01f /src | |
| parent | 0f1c169c4716ad0148014be22b9e54c54474a469 (diff) | |
client/view/selction: fix sortedArrayDiff
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/view/selection.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/view/selection.js b/src/client/view/selection.js index e85a750d..090b1a5f 100644 --- a/src/client/view/selection.js +++ b/src/client/view/selection.js @@ -44,7 +44,7 @@ function sortedArrayDiff(a, b, a_cmp_b) b_i += 1; a_i += 1; } - while (b_i < b.length && a_cmp_b(a[a_i], b[b_i]) == 1) { + while (b_i < b.length && a_i < a.length && a_cmp_b(a[a_i], b[b_i]) == 1) { b_i += 1; } } |
