Skip to content

Commit

Permalink
fix(check): add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
christianmat committed Feb 3, 2023
1 parent 949d45f commit d65189c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/api/flows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ export function useFlows() {

function getStepStatus(flowSlug: string, stepId: string) {
// TODO: add server-side call to sync date.
// Iterate through all flow responses and find the latest one for this step
const responsesForStep = flowResponses.filter(
const responsesForStep = flowResponses ? flowResponses.filter(
(r) => r.flowSlug === flowSlug && r.stepId === stepId
);
)[0] : null;
}

function getFlowData(slug: string): Flow {
Expand Down

0 comments on commit d65189c

Please sign in to comment.