Skip to content

Commit

Permalink
fix(designer): Fix custom code bug (#4577)
Browse files Browse the repository at this point in the history
* remove outputs if not included

* bug
  • Loading branch information
Eric-B-Wu committed Apr 8, 2024
1 parent a036481 commit 614178e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libs/designer/src/lib/core/utils/parameters/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2620,11 +2620,12 @@ export const getCustomCodeFilesWithData = (state: CustomCodeState): CustomCodeFi
Object.entries(files).forEach(([fileName, fileInfo]) => {
const { nodeId } = fileInfo;
const fileDataInfo = getRecordEntry(fileData, nodeId);
if (!fileDataInfo && !fileInfo.isDeleted) return;
customCodeFilesWithData[fileName] = {
...fileInfo,
fileData: fileDataInfo,
};
if (fileDataInfo || fileInfo.isDeleted) {
customCodeFilesWithData[fileName] = {
...fileInfo,
fileData: fileDataInfo ?? '',
};
}
});
return customCodeFilesWithData;
};
Expand Down

0 comments on commit 614178e

Please sign in to comment.