Skip to content

Commit 9b2a658

Browse files
author
Guillaume Chau
committed
fix(ssr): document could not be defined, closes #112
1 parent cbb89a4 commit 9b2a658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/RecycleScroller.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ export default {
450450
getListenerTarget () {
451451
let target = ScrollParent(this.$el)
452452
// Fix global scroll target for Chrome and Safari
453-
if (target === window.document.documentElement || target === window.document.body) {
453+
if (window.document && (target === window.document.documentElement || target === window.document.body)) {
454454
target = window
455455
}
456456
return target

0 commit comments

Comments
 (0)