Skip to content

Commit

Permalink
fix: Исправлена ошибка на других страницах с сайдбаром
Browse files Browse the repository at this point in the history
  • Loading branch information
GulomovCreative committed Oct 22, 2023
1 parent 47f8a89 commit e2e2b87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .vitepress/theme/components/DocsSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ function scrollToActiveElement() {
watch(() => route.data.relativePath, (newPath, oldPath) => {
nextTick(() => {
if (/^(\w*\/)?components\/(?!index.md)/.test(oldPath)) {
if (
!newPath.includes('components/')
|| /^(\w*\/)?components\/(?!index.md)/.test(oldPath)
) {
return
}
Expand Down

0 comments on commit e2e2b87

Please sign in to comment.