refactor: moved the nobeliefCyclerule into BeliefGlobals, and fixed function and filenaming
ref: N25B-433
This commit is contained in:
@@ -12,7 +12,7 @@ import {allowOnlyConnectionsFromHandle, allowOnlyConnectionsFromType} from "../H
|
||||
import useFlowStore from '../VisProgStores';
|
||||
import { PlanReduce, type Plan } from '../components/Plan';
|
||||
import PlanEditorDialog from '../components/PlanEditor';
|
||||
import {BeliefGlobals} from "./BeliefGlobals.ts";
|
||||
import {BeliefGlobalReduce} from "./BeliefGlobals.ts";
|
||||
|
||||
/**
|
||||
* The default data structure for a Trigger node
|
||||
@@ -92,7 +92,7 @@ export default function TriggerNode(props: NodeProps<TriggerNode>) {
|
||||
export function TriggerReduce(node: Node, nodes: Node[]) {
|
||||
const data = node.data as TriggerNodeData;
|
||||
const conditionNode = data.condition ? nodes.find((n)=>n.id===data.condition) : undefined
|
||||
const conditionData = conditionNode ? BeliefGlobals(conditionNode, nodes) : ""
|
||||
const conditionData = conditionNode ? BeliefGlobalReduce(conditionNode, nodes) : ""
|
||||
return {
|
||||
id: node.id,
|
||||
condition: conditionData, // Make sure we have a condition before reducing, or default to ""
|
||||
|
||||
Reference in New Issue
Block a user