diff --git a/packages/ui-components/src/BrowseFileDialog.tsx b/packages/ui-components/src/BrowseFileDialog.tsx index 3b584347a..555fcbc81 100644 --- a/packages/ui-components/src/BrowseFileDialog.tsx +++ b/packages/ui-components/src/BrowseFileDialog.tsx @@ -237,8 +237,8 @@ export const showBrowseFileDialog = async ( const relativeToPath = options.rootPath.endsWith('/') ? options.rootPath : options.rootPath + '/'; - result.value.forEach((val: string) => { - val = val.replace(relativeToPath, ''); + result.value = result.value.map((val: string) => { + return val.replace(relativeToPath, ''); }); } diff --git a/tests/snapshots/pipeline-editor-tests/matches-complex-pipeline-snapshot.1.snap b/tests/snapshots/pipeline-editor-tests/matches-complex-pipeline-snapshot.1.snap index 4269b3bbe..1101cfb94 100644 --- a/tests/snapshots/pipeline-editor-tests/matches-complex-pipeline-snapshot.1.snap +++ b/tests/snapshots/pipeline-editor-tests/matches-complex-pipeline-snapshot.1.snap @@ -136,7 +136,7 @@ "app_data": { "component_parameters": { "dependencies": [ - "scripts/setup.txt" + "setup.txt" ], "include_subdirectories": false, "outputs": [],