File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,6 @@ export default class Virtual {
210210 // return a scroll offset from given index, can efficiency be improved more here?
211211 // although the call frequency is very high, its only a superposition of numbers
212212 getIndexOffset ( givenIndex ) {
213- // we know this.
214213 if ( ! givenIndex ) {
215214 return 0
216215 }
@@ -220,7 +219,7 @@ export default class Virtual {
220219 for ( let index = 0 ; index < givenIndex ; index ++ ) {
221220 // this.__getIndexOffsetCalls++
222221 indexSize = this . sizes . get ( this . param . uniqueIds [ index ] )
223- offset = offset + ( indexSize || this . getEstimateSize ( ) )
222+ offset = offset + ( typeof indexSize === 'number' ? indexSize : this . getEstimateSize ( ) )
224223 }
225224
226225 // remember last calculate index
You can’t perform that action at this time.
0 commit comments