Skip to content

Commit cb7f958

Browse files
committed
Make sure offset and start called safety.
1 parent af3fb18 commit cb7f958

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

examples/build/finite.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/build/infinite.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/build/variable.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@
282282

283283
// set manual scroll top.
284284
setScrollTop: function (scrollTop) {
285-
this.$refs.vsl.scrollTop = scrollTop
285+
var vsl = this.$refs.vsl
286+
if (vsl) {
287+
vsl.scrollTop = scrollTop
288+
}
286289
},
287290

288291
// filter the shown items base on `start` and `end`.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-virtual-scroll-list",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"description": "A vue (2.x) component that support big data list with high scroll performance.",
55
"main": "index.js",
66
"files": [

0 commit comments

Comments
 (0)