diff options
author | 2023-07-03 05:59:43 -0700 | |
---|---|---|
committer | 2023-07-03 20:59:43 +0800 | |
commit | 2fea174303ca60f4765c6294d99ebc7a19e73403 (patch) | |
tree | 671f1f27d6d0827e51aaa20704b7f6154ad5d053 /packages/integrations/mdx/src/utils.ts | |
parent | fc6826ff7620b0c5e419de93ef7c463a12fe3652 (diff) | |
download | astro-2fea174303ca60f4765c6294d99ebc7a19e73403.tar.gz astro-2fea174303ca60f4765c6294d99ebc7a19e73403.tar.zst astro-2fea174303ca60f4765c6294d99ebc7a19e73403.zip |
feat: use typescript-eslint@v6's reworked configs (#7425)
Diffstat (limited to 'packages/integrations/mdx/src/utils.ts')
-rw-r--r-- | packages/integrations/mdx/src/utils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/integrations/mdx/src/utils.ts b/packages/integrations/mdx/src/utils.ts index 80f8c3e20..3425c50e3 100644 --- a/packages/integrations/mdx/src/utils.ts +++ b/packages/integrations/mdx/src/utils.ts @@ -32,7 +32,7 @@ export function getFileInfo(id: string, config: AstroConfig): FileInfo { const isPage = fileId.includes('/pages/'); if (isPage) { fileUrl = fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.mdx$/, ''); - } else if (url && url.pathname.startsWith(config.root.pathname)) { + } else if (url?.pathname.startsWith(config.root.pathname)) { fileUrl = url.pathname.slice(config.root.pathname.length); } else { fileUrl = fileId; |