Skip to content

Commit

Permalink
change for flattening out file list (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 authored Jan 10, 2025
1 parent 62bbec8 commit 82bcd93
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 82bcd93

Please sign in to comment.