Skip to content

Commit 603978b

Browse files
sarahsEbonsignoriCopilot
authored
Fix product string bug (#56313)
Co-authored-by: Evan Bonsignori <ebonsignori@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 921e931 commit 603978b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/frame/lib/path-utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,16 @@ export function getProductStringFromPath(href) {
102102

103103
if (href === '/') return 'homepage'
104104

105+
// The first segment will always be empty on this split
105106
const pathParts = href.split('/')
106107

107108
if (pathParts.includes('early-access')) return 'early-access'
108109

109110
// For rest pages the currentProduct should be rest
110111
// We use this to show SidebarRest, which is a different sidebar than the rest of the site
111112
if (pathParts[1] === 'rest') return 'rest'
113+
if (pathParts[1] === 'copilot') return 'copilot'
114+
if (pathParts[1] === 'get-started') return 'get-started'
112115

113116
return productIds.includes(pathParts[2]) ? pathParts[2] : pathParts[1]
114117
}

0 commit comments

Comments
 (0)