瀏覽代碼

more chunkSize sanitizing

Alexander Rose 6 年之前
父節點
當前提交
f28484319f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/mol-data/util/chunked-array.ts

+ 1 - 1
src/mol-data/util/chunked-array.ts

@@ -144,7 +144,7 @@ namespace ChunkedArray {
             ctor,
             elementSize,
 
-            growBy: Math.floor(chunkSize),
+            growBy: Math.max(1, Math.ceil(chunkSize)),
             allocatedSize: 0,
             elementCount: 0,