We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9fa428 commit dbd4bf7Copy full SHA for dbd4bf7
src/virtual.js
@@ -106,7 +106,7 @@ export default class Virtual {
106
// calculate the average size only in the first range
107
if (this.calcType !== CALC_TYPE.FIXED && typeof this.firstRangeTotalSize !== 'undefined') {
108
if (this.sizes.size < Math.min(this.param.keeps, this.param.uniqueIds.length)) {
109
- this.firstRangeTotalSize = this.firstRangeTotalSize + size
+ this.firstRangeTotalSize = [...this.sizes.values()].reduce((acc, val) => acc + val, 0)
110
this.firstRangeAverageSize = Math.round(this.firstRangeTotalSize / this.sizes.size)
111
} else {
112
// it's done using
0 commit comments