Skip to content

Commit 2dbecaf

Browse files
committed
fix(snippets): scroll to top
1 parent bd82dd4 commit 2dbecaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/components/snippets/SnippetList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const listRef = ref<HTMLElement>()
3939
4040
const setScrollPosition = (offset: number) => {
4141
const ps = listRef.value?.querySelector<HTMLElement>('.ps')
42-
ps!.scrollTop = offset
42+
if (ps) ps.scrollTop = offset
4343
}
4444
4545
watch(

0 commit comments

Comments
 (0)