From 2327a8e374032a3ac29c3efb05e1d2e3e4f4acc9 Mon Sep 17 00:00:00 2001 From: havok2063 Date: Fri, 6 Dec 2024 09:33:56 -0800 Subject: [PATCH] change for flattening out file list --- src/views/Target.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/Target.vue b/src/views/Target.vue index 2ffb066..60e345b 100644 --- a/src/views/Target.vue +++ b/src/views/Target.vue @@ -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)