Enable region-aware links in messages.
This commit is contained in:
Родитель
d8cc5dfe73
Коммит
b8f21a1f4f
|
@ -168,8 +168,8 @@ function renderMessageWithEmbeddedLinks(result: Result, message: string) {
|
|||
// Else `id` is a number
|
||||
// TODO: search other location coolections
|
||||
// RelatedLocations is typically [{ id: 1, ...}, { id: 2, ...}]
|
||||
const location = result.relatedLocations?.find(location => location.id === +id)
|
||||
return getRepoUri(location?.physicalLocation?.artifactLocation?.uri, result.run)
|
||||
const physicalLocation = result.relatedLocations?.find(location => location.id === +id)?.physicalLocation
|
||||
return getRepoUri(physicalLocation?.artifactLocation?.uri, result.run, physicalLocation?.region)
|
||||
})()
|
||||
|
||||
return href
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@microsoft/sarif-web-component",
|
||||
"version": "0.6.0-14",
|
||||
"version": "0.6.0-15",
|
||||
"author": "Microsoft",
|
||||
"description": "Sarif Viewer",
|
||||
"license": "MIT",
|
||||
|
|
Загрузка…
Ссылка в новой задаче