File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -291,14 +291,10 @@ export default {
291291 let startIndex, endIndex
292292 let totalSize
293293
294- if (! count) {
295- startIndex = endIndex = totalSize = 0
296- } else if (this .$_prerender ) {
297- startIndex = 0
298- endIndex = this .prerender
299- totalSize = null
300- } else {
301- const scroll = this .getScroll ()
294+ let scroll
295+
296+ if (count && ! this .$_prerender ) {
297+ scroll = this .getScroll ()
302298
303299 // Skip update if use hasn't scrolled enough
304300 if (checkPositionDiff) {
@@ -310,6 +306,15 @@ export default {
310306 }
311307 }
312308 }
309+ }
310+
311+ if (! count) {
312+ startIndex = endIndex = totalSize = 0
313+ } else if (this .$_prerender ) {
314+ startIndex = 0
315+ endIndex = this .prerender
316+ totalSize = null
317+ } else {
313318 this .$_lastUpdateScrollPosition = scroll .start
314319
315320 const buffer = this .buffer
You can’t perform that action at this time.
0 commit comments