Skip to content

Commit a21c674

Browse files
committed
Eslint --fix
1 parent 304df9f commit a21c674

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const VirtualList = Vue.component(NAME, {
7676
// set current scroll position to a expectant index
7777
scrollToIndex (index) {
7878
// scroll to top
79-
if (index === 0) {
79+
if (index <= 0) {
8080
this.scrollToOffset(0)
8181
} else if (index >= this.dataSources.length - 1) {
8282
// scroll to bottom
@@ -100,7 +100,7 @@ const VirtualList = Vue.component(NAME, {
100100
if (this.getOffset() + this.getClientSize() < this.getScrollSize()) {
101101
this.scrollToBottom()
102102
}
103-
}, 3);
103+
}, 3)
104104
}
105105
},
106106

0 commit comments

Comments
 (0)