fix linter error in platform script

This commit is contained in:
Madison 2025-07-23 14:20:16 -05:00
parent 6590245e8e
commit adc9da4948

View File

@ -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;
}