diff --git a/designer/client/src/actions/nk/processDefinitionData.ts b/designer/client/src/actions/nk/processDefinitionData.ts index 7d7e6c517eb..fa06bd93f49 100644 --- a/designer/client/src/actions/nk/processDefinitionData.ts +++ b/designer/client/src/actions/nk/processDefinitionData.ts @@ -1,7 +1,6 @@ import HttpService from "../../http/HttpService"; -import { ProcessDefinitionData, TypingResult } from "../../types"; +import { ProcessDefinitionData } from "../../types"; import { ThunkAction } from "../reduxTypes"; -import { orderBy } from "lodash"; export type ProcessDefinitionDataAction = { type: "PROCESS_DEFINITION_DATA"; @@ -10,14 +9,10 @@ export type ProcessDefinitionDataAction = { export type ProcessingType = string; -const orderedProcessDefinitionDataClasses = (classes: TypingResult[]) => orderBy(classes, ["display", "refClazzName"]); - export function fetchProcessDefinition(processingType: ProcessingType, isFragment?: boolean): ThunkAction> { return async (dispatch) => { const { data: processDefinitionData } = await HttpService.fetchProcessDefinitionData(processingType, isFragment); - // Since BE doesn't provide ordered classes, to correctly memoize data in redux and not create a new object reference on every state change we need to order classes - processDefinitionData.classes = orderedProcessDefinitionDataClasses(processDefinitionData.classes); dispatch({ type: "PROCESS_DEFINITION_DATA", processDefinitionData }); return processDefinitionData;