Skip to content

Commit 81590c8

Browse files
authored
fix: handle no ref (#1022)
1 parent 6424db2 commit 81590c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pages/home/index.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ export default Vue.extend({
367367
if (this.$store.state.settings.lastActivePost !== ``) {
368368
const reloadRef = this.$refs.reload as HTMLElement
369369
const container = this.$refs.container as HTMLElement
370-
container.scrollBy(0, reloadRef.clientHeight)
370+
if (container && reloadRef) {
371+
container.scrollBy(0, reloadRef.clientHeight)
372+
}
371373
}
372374
},
373375
},

0 commit comments

Comments
 (0)