ESC-511-when-accessing-the-form-su

Update OpenFile.vue to Ensure Proper File Parsing

- Modified the `parsedFiles` computed property in OpenFile.vue to check if `this.value` is an array before mapping over it. This change prevents potential errors when `this.value` is null or not an array, enhancing the robustness of the file parsing logic.

These changes aim to improve the reliability of file handling within the component, ensuring that only valid arrays are processed.
This commit is contained in:
Julien Nahum 2025-03-26 17:16:23 +01:00
parent 8036fc9c44
commit 66dd6899d3
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ export default {
computed: {
parsedFiles() {
return this.value
return this.value && Array.isArray(this.value)
? this.value.map((file) => {
return {
file_name: file.file_name,