From adc9da4948d11c249a5cdba8091f7186dc3d83f7 Mon Sep 17 00:00:00 2001 From: Madison Date: Wed, 23 Jul 2025 14:20:16 -0500 Subject: [PATCH] fix linter error in platform script --- docs/scripts/generate-platform-navigation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/scripts/generate-platform-navigation.js b/docs/scripts/generate-platform-navigation.js index 97c8fa7f8..b823ad078 100644 --- a/docs/scripts/generate-platform-navigation.js +++ b/docs/scripts/generate-platform-navigation.js @@ -64,15 +64,15 @@ export function pageExistsForPlatform(path: string, platform: Platform): boolean // First try to find exact match let page = PLATFORM_PAGES.find(p => p.path === pathWithExt); - + // If not found and path doesn't end with index, try appending /index.mdx if (!page && !pathWithExt.includes('/index.mdx')) { - const indexPath = normalizedPath.endsWith('.mdx') + const indexPath = normalizedPath.endsWith('.mdx') ? normalizedPath.replace('.mdx', '/index.mdx') : \`\${normalizedPath}/index.mdx\`; page = PLATFORM_PAGES.find(p => p.path === indexPath); } - + return page?.platforms.includes(platform) ?? false; }