Skip to content

Commit

Permalink
change for flattening out file list
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Dec 6, 2024
1 parent 3953458 commit 2327a8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/views/Target.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ async function get_target_info() {
carts.value = cartons
sources.value = catalogs
pipelines.value = pipes
files.value = Object.values(pipes.files).filter(x => x != null && x != '')
files.value = Object.values(pipes.files)
.flatMap(value => Array.isArray(value) ? value : [value])
.filter(filePath => filePath && filePath.trim() !== '');
console.log('files', files.value, files.value.length)
has_files.value = check_files(files.value)
console.log('has_files', has_files.value)
Expand Down

0 comments on commit 2327a8e

Please sign in to comment.