Commit 78aef33c authored by Kev's avatar Kev Committed by Olena Horal-Koretska

Fix Duplicate Keys in Vulnerability Details

parent 7bc75068
...@@ -202,7 +202,7 @@ export default { ...@@ -202,7 +202,7 @@ export default {
<template v-if="vulnerability.links && vulnerability.links.length"> <template v-if="vulnerability.links && vulnerability.links.length">
<h3>{{ __('Links') }}</h3> <h3>{{ __('Links') }}</h3>
<ul> <ul>
<li v-for="link in vulnerability.links" :key="link.url"> <li v-for="(link, index) in vulnerability.links" :key="`${index}:${link.url}`">
<gl-link <gl-link
:href="link.url" :href="link.url"
data-testid="link" data-testid="link"
...@@ -219,7 +219,10 @@ export default { ...@@ -219,7 +219,10 @@ export default {
<template v-if="vulnerability.identifiers && vulnerability.identifiers.length"> <template v-if="vulnerability.identifiers && vulnerability.identifiers.length">
<h3>{{ __('Identifiers') }}</h3> <h3>{{ __('Identifiers') }}</h3>
<ul> <ul>
<li v-for="identifier in vulnerability.identifiers" :key="identifier.url"> <li
v-for="(identifier, index) in vulnerability.identifiers"
:key="`${index}:${identifier.url}`"
>
<gl-link :href="identifier.url" data-testid="identifier" target="_blank"> <gl-link :href="identifier.url" data-testid="identifier" target="_blank">
{{ identifier.name }} {{ identifier.name }}
</gl-link> </gl-link>
...@@ -231,8 +234,8 @@ export default { ...@@ -231,8 +234,8 @@ export default {
<h3>{{ s__('Vulnerability|Request') }}</h3> <h3>{{ s__('Vulnerability|Request') }}</h3>
<ul> <ul>
<detail-item <detail-item
v-for="{ label, isCode, content } in requestData" v-for="({ label, isCode, content }, index) in requestData"
:key="label" :key="`${index}:${label}`"
:sprintf-message="label" :sprintf-message="label"
> >
<code-block v-if="isCode" class="mt-1" :code="content" max-height="225px" /> <code-block v-if="isCode" class="mt-1" :code="content" max-height="225px" />
...@@ -247,8 +250,8 @@ export default { ...@@ -247,8 +250,8 @@ export default {
<h3>{{ s__('Vulnerability|Response') }}</h3> <h3>{{ s__('Vulnerability|Response') }}</h3>
<ul> <ul>
<detail-item <detail-item
v-for="{ label, isCode, content } in responseData" v-for="({ label, isCode, content }, index) in responseData"
:key="label" :key="`${index}:${label}`"
:sprintf-message="label" :sprintf-message="label"
> >
<code-block v-if="isCode" class="mt-1" :code="content" max-height="225px" /> <code-block v-if="isCode" class="mt-1" :code="content" max-height="225px" />
......
---
title: Fix Duplicate Keys in Vulnerability Details
merge_request: 42027
author: Kev @KevSlashNull
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment