Skip to content

Commit

Permalink
Revert "fix: checkForDynamicExecutions"
Browse files Browse the repository at this point in the history
This reverts commit 450d144.
  • Loading branch information
james-union committed Feb 7, 2023
1 parent 450d144 commit 77fac08
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/console/src/components/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ export function measureText(fontDefinition: string, text: string) {
*/
export const checkForDynamicExecutions = (allExecutions, staticExecutions) => {
const parentsToFetch = {};
const executionsByNodeId = {};
for (const executionId in allExecutions) {
const execution = allExecutions[executionId];
executionsByNodeId[execution.id.nodeId] = execution;
if (!staticExecutions[executionId]) {
if (execution) {
const dynamicExecution = allExecutions[executionId];
if (dynamicExecution) {
const dynamicExecutionId =
execution.metadata?.specNodeId || execution.id;
const uniqueParentId = execution.fromUniqueParentId;
dynamicExecution.metadata?.specNodeId || dynamicExecution.id;
const uniqueParentId = dynamicExecution.fromUniqueParentId;
if (uniqueParentId) {
if (parentsToFetch[uniqueParentId]) {
parentsToFetch[uniqueParentId].push(dynamicExecutionId);
Expand All @@ -48,8 +46,7 @@ export const checkForDynamicExecutions = (allExecutions, staticExecutions) => {
}
const result = {};
for (const parentId in parentsToFetch) {
const execution = executionsByNodeId[parentId];
result[execution.scopedId] = execution;
result[parentId] = allExecutions[parentId];
}
return result;
};

0 comments on commit 77fac08

Please sign in to comment.