Skip to content

Commit bb75e3f

Browse files
author
Guillaume Chau
committed
fix: error when scrolling to inspected
1 parent 007b788 commit bb75e3f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/app-frontend/src/mixins/entry-list.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ export default function ({
2222
requestAnimationFrame(() => {
2323
if (this.inspectedIndex) this.scrollIntoInspected(this.inspectedIndex)
2424
})
25-
}, 100, {
25+
}, 200, {
2626
leading: true
2727
}),
2828

2929
scrollIntoInspected: debounce(function (index) {
3030
index += indexOffset
3131
this.$nextTick(() => {
3232
const scroller = this.$globalRefs.leftRecycleList || this.$globalRefs.leftScroll
33+
if (!scroller) {
34+
this.scrollIntoInspected(index)
35+
return
36+
}
3337
const parentHeight = scroller.offsetHeight
3438
const height = this.highDensity ? 22 : 34
3539
const top = index * height
@@ -40,7 +44,7 @@ export default function ({
4044
scroller.scrollTop = top + height - parentHeight
4145
}
4246
})
43-
}, 30, {
47+
}, 200, {
4448
leading: true
4549
})
4650
}

0 commit comments

Comments
 (0)