Skip to content

Commit c1b4b6f

Browse files
authored
Add comment to explain QSP logic
1 parent b1893e4 commit c1b4b6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/Menu/VersionSwitcher/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export function LibVersionSwitcher({
130130
urlEnd = url.split("/lib")[1];
131131
}
132132

133+
// Function to remove query string parameters before checking if href is included in the list of possibilities.
134+
// This is so we are only comparing the paths without the query string parameters to avoid false negatives.
133135
function isHrefIncluded(href: string, paths: string[]) {
134136
href = href.split("#")[0];
135137
if (href.endsWith("/")) {

0 commit comments

Comments
 (0)