remove placeholder text for blocks without in the the workflow run ui (#3465)
This commit is contained in:
@@ -91,12 +91,6 @@ export const getOrderedBlockLabels = (workflow?: WorkflowApiResponse) => {
|
||||
return blockLabels;
|
||||
};
|
||||
|
||||
const getCommentForBlockWithoutCode = (blockLabel: string) => {
|
||||
return `
|
||||
# block '${blockLabel}' code goes here
|
||||
`;
|
||||
};
|
||||
|
||||
export const getCode = (
|
||||
orderedBlockLabels: string[],
|
||||
blockScripts?: {
|
||||
@@ -114,7 +108,6 @@ export const getCode = (
|
||||
const code = blockScripts?.[blockLabel];
|
||||
|
||||
if (!code) {
|
||||
blockCode.push(getCommentForBlockWithoutCode(blockLabel));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ function WorkflowRunCode(props?: Props) {
|
||||
pollIntervalMs: !isFinalized ? 3000 : undefined,
|
||||
});
|
||||
const orderedBlockLabels = getOrderedBlockLabels(workflow);
|
||||
const code = getCode(orderedBlockLabels, blockScripts).join("");
|
||||
const code = getCode(orderedBlockLabels, blockScripts).join("").trim();
|
||||
|
||||
useEffect(() => {
|
||||
setCacheKeyValue(
|
||||
|
||||
Reference in New Issue
Block a user