Skip to content

Commit

Permalink
Fix navigating to a refname result that is also indexed in search tra…
Browse files Browse the repository at this point in the history
…ck index (#4593)
  • Loading branch information
cmdcolin authored Oct 23, 2024
1 parent 931672e commit 6a3ed84
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ export default function SearchResultsTable({
<Button
onClick={async () => {
try {
const location = result.getLocation()
if (location) {
await handleClick(location)
const resultTrackId = result.getTrackId()
if (resultTrackId) {
model.showTrack(resultTrackId)
}
await handleClick(
// label is used if it is a refName, it has no location
result.getLocation() || result.getLabel(),
)
const resultTrackId = result.getTrackId()
if (resultTrackId) {
model.showTrack(resultTrackId)
}
} catch (e) {
console.error(e)
Expand Down

0 comments on commit 6a3ed84

Please sign in to comment.