chore: only check if play is undefined
This commit is contained in:
@@ -85,9 +85,8 @@ const useProgramStore = create<ProgramState>((set, get) => ({
|
||||
const rootGoals = phase["goals"] as Record<string, unknown>[];
|
||||
const flatList: GoalWithDepth[] = [];
|
||||
|
||||
// Helper: Define this ONCE, outside the loop
|
||||
const isGoal = (item: Record<string, unknown>) => {
|
||||
return item["plan"] !== undefined && item["plan"] !== null;
|
||||
return item["plan"] !== undefined;
|
||||
};
|
||||
|
||||
// Recursive helper function
|
||||
|
||||
Reference in New Issue
Block a user