Use structuredClone instead of JSON.parse(JSON.stringify()) (S7784)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -586,7 +586,7 @@ const isCompareDisabledButton = computed(() => {
|
||||
const reallyDeleteData = computed(() => {
|
||||
let result = [];
|
||||
if (store.allFiles.length !== 0) {
|
||||
result = JSON.parse(JSON.stringify(store.allFiles));
|
||||
result = structuredClone(store.allFiles);
|
||||
result = result.filter((file) => file.is_deleted === true);
|
||||
}
|
||||
return result;
|
||||
@@ -602,7 +602,7 @@ watch(filesTag, (newValue) => {
|
||||
|
||||
watch(allFiles, (newValue) => {
|
||||
if (newValue !== null)
|
||||
compareData.value = JSON.parse(JSON.stringify(newValue));
|
||||
compareData.value = structuredClone(newValue);
|
||||
});
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user