Skip to content

Commit

Permalink
update version change condition
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolee1231 committed Dec 13, 2023
1 parent 463fc44 commit 6776e5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
useEventListener('click', (event) => {
const target = event.target as HTMLAnchorElement;
if (target.tagName.toLowerCase() === 'a' && /v[^\/]*\/$/.test(target.href)) {
if (
target.tagName.toLowerCase() === 'a' &&
(/v[^\/]*\/$/.test(target.href) ||
(target.href === 'https://docs.deepwisdom.ai/' &&
target.target === '_blank'))
) {
event.preventDefault();
const link = `${target.href}${location.pathname
.replace(/^\/v[^\/]*\//, '/')
Expand Down

0 comments on commit 6776e5a

Please sign in to comment.