Skip to content

Commit

Permalink
chore: fix vuepress bundle error
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamOfIce committed Apr 24, 2023
1 parent a683fe2 commit da25f5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/components/I18nTip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
PageData,
} from "../../shared/types";
import { computed } from "vue";
import { isAbsoluteUrl } from "vuepress-shared";
import { isAbsoluteUrl } from "vuepress-shared/client";
type I18nPluginTipType = "untranslated" | "outdated";
Expand Down
3 changes: 2 additions & 1 deletion src/node/lib/writeLocales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { colors } from "@vuepress/utils";
import type { I18nPluginLocaleData } from "../../shared/types.js";
import type { I18nPluginInternalOptions } from "../options.js";
import { logger } from "../utils.js";
import { isAbsoluteUrl } from "vuepress-shared";

const keyRegExp = /^(?!\d)[a-z0-9_]+/i;
/**
Expand Down Expand Up @@ -38,7 +39,7 @@ const getCodeStr: (input: unknown) => string = (input) => {
};

const gettranslationGuides = (app: App, translationGuide?: string) => {
if (!translationGuide || !translationGuide.startsWith("/"))
if (!translationGuide || isAbsoluteUrl(translationGuide))
return { "/": translationGuide };
const links: Record<string, string> = { "/": translationGuide };
app.pages.forEach((page) => {
Expand Down

0 comments on commit da25f5d

Please sign in to comment.