Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit a72247a

Browse files
sqsfelixfbecker
authored andcommitted
fix: use new &tab= URL format
Since https://github.com/sourcegraph/sourcegraph/pull/12109, URLs with a view state (eg `references`) have used `#L123&tab=references` not `#L123$references`. This commit fixes the URLs for the hover actions, which eliminates a `<Redirect>` (which, in turn, causes a full unmount-mount cycle for `BlobPage` and all of its children, which is slow).
1 parent 55c4a18 commit a72247a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function escapeRevspecForURL(rev: string): string {
135135
}
136136

137137
export function toViewStateHashComponent(viewState: string | undefined): string {
138-
return viewState ? `$${viewState}` : ''
138+
return viewState ? `&tab=${viewState}` : ''
139139
}
140140

141141
export function toPrettyBlobURL(

0 commit comments

Comments
 (0)