Skip to content

Commit 73de5fb

Browse files
committed
Defalut var szie could be 0.
1 parent 291d8d8 commit 73de5fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
// return a variable size (height) from a given index.
221221
getVarSize: function (index) {
222222
var cache = this.delta.varCache[index]
223-
return (cache && cache.size) || this.variable(index) || this.size
223+
return (cache && cache.size) || this.variable(index) || 0
224224
},
225225

226226
// return the paddingBottom when variable height base current zone.
@@ -230,7 +230,7 @@
230230
return this.getVarOffset(delta.total) - this.getVarOffset(delta.end)
231231
} else {
232232
// if unreached last zone or uncalculate real behind offset
233-
// continue return the estimate paddingBottom avoid max calculate.
233+
// return the estimate paddingBottom avoid too much calculate.
234234
return (delta.total - delta.end) * (delta.averageSize || this.size)
235235
}
236236
},

0 commit comments

Comments
 (0)