Ver Fonte

OrderedSet intersection tweak

David Sehnal há 7 anos atrás
pai
commit
ca5dc25917
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      src/mol-data/int/impl/ordered-set.ts

+ 1 - 0
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;