Skip to content

Commit

Permalink
fix: track the node type as text rather than integer for new records
Browse files Browse the repository at this point in the history
- The node types as text are easier to interpret in analytics_logs
  • Loading branch information
Mike-Heneghan committed Jan 10, 2024
1 parent 3673aff commit e14743d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type NodeMetadata = {
};
flag?: Flag;
title?: string;
type?: TYPES;
type?: string | null;
id?: string;
isAutoAnswered?: boolean;
};
Expand Down Expand Up @@ -434,9 +434,10 @@ export const AnalyticsProvider: React.FC<{ children: React.ReactNode }> = ({

function getTargetNodeDataFromFlow(nodeId: string) {
const node = flow[nodeId];
const nodeType = node?.type ? TYPES[node.type] : null;
const nodeMetadata: NodeMetadata = {
title: extractNodeTitle(node),
type: node.type,
type: nodeType,
id: nodeId,
};
return nodeMetadata;
Expand Down

0 comments on commit e14743d

Please sign in to comment.