Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 727dcb6

Browse filesBrowse files
committed
fix(CSidebar): update interesction observer to work properly when visible property is not provided
1 parent 8278539 commit 727dcb6
Copy full SHA for 727dcb6

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/components/sidebar/CSidebar.ts

Copy file name to clipboardExpand all lines: src/components/sidebar/CSidebar.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const CSidebar = defineComponent({
8383

8484
const callback = (entries: IntersectionObserverEntry[]) => {
8585
entries.forEach((entry) => {
86-
if (entry.isIntersecting !== props.visible) {
86+
if (entry.isIntersecting !== props.visible || typeof visible.value === 'undefined') {
8787
visible.value = entry.isIntersecting
8888
emit('visible-change', visible.value)
8989
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.