From ca5dc25917cec91965e54fa4aa862327708f611a Mon Sep 17 00:00:00 2001 From: David Sehnal <david.sehnal@gmail.com> Date: Sat, 11 Nov 2017 14:47:34 +0100 Subject: [PATCH] OrderedSet intersection tweak --- src/mol-data/int/impl/ordered-set.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mol-data/int/impl/ordered-set.ts b/src/mol-data/int/impl/ordered-set.ts index a5631f761..baa6bef0e 100644 --- a/src/mol-data/int/impl/ordered-set.ts +++ b/src/mol-data/int/impl/ordered-set.ts @@ -170,6 +170,7 @@ function intersectSI(a: S, b: I) { const start = I.start(r), end = I.end(r); const resultSize = end - start; if (!resultSize) return Empty; + if (resultSize === a.length) return a; const indices = new Int32Array(resultSize); let offset = 0; -- GitLab