Use structuredClone instead of JSON.parse(JSON.stringify()) (S7784)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -183,7 +183,7 @@ const traceList = computed(() => {
|
||||
|
||||
const caseData = computed(() => {
|
||||
if (infiniteData.value !== null) {
|
||||
const data = JSON.parse(JSON.stringify(infiniteData.value)); // Deep copy the original cases data
|
||||
const data = structuredClone(infiniteData.value); // Deep copy the original cases data
|
||||
data.forEach((item) => {
|
||||
item.facets.forEach((facet, index) => {
|
||||
item[`fac_${index}`] = facet.value; // Create a new key-value pair
|
||||
@@ -201,7 +201,7 @@ const caseData = computed(() => {
|
||||
});
|
||||
|
||||
const columnData = computed(() => {
|
||||
const data = JSON.parse(JSON.stringify(props.cases)); // Deep copy the original cases data
|
||||
const data = structuredClone(props.cases); // Deep copy the original cases data
|
||||
if (!data || data.length === 0) return [];
|
||||
const facetName = (facName) =>
|
||||
facName
|
||||
|
||||
Reference in New Issue
Block a user