feat: small fix to trigger node
ref: N25B-450
This commit is contained in:
@@ -139,7 +139,7 @@ export default function TriggerNode(props: NodeProps<TriggerNode>) {
|
|||||||
id="TriggerBeliefs"
|
id="TriggerBeliefs"
|
||||||
style={{ left: '40%' }}
|
style={{ left: '40%' }}
|
||||||
rules={[
|
rules={[
|
||||||
allowOnlyConnectionsFromType(['basic_belief']),
|
allowOnlyConnectionsFromType(['basic_belief','inferred_belief']),
|
||||||
]}
|
]}
|
||||||
title="Connect to a beliefNode or a set of beliefs combined using the AND/OR node"
|
title="Connect to a beliefNode or a set of beliefs combined using the AND/OR node"
|
||||||
/>
|
/>
|
||||||
@@ -205,7 +205,7 @@ export function TriggerConnectionTarget(_thisNode: Node, _sourceNodeId: string)
|
|||||||
const otherNode = nodes.find((x) => x.id === _sourceNodeId)
|
const otherNode = nodes.find((x) => x.id === _sourceNodeId)
|
||||||
if (!otherNode) return;
|
if (!otherNode) return;
|
||||||
|
|
||||||
if (otherNode.type === 'basic_belief' /* TODO: Add the option for an inferred belief */) {
|
if (['basic_belief', 'inferred_belief'].includes(otherNode.type!)) {
|
||||||
data.condition = _sourceNodeId;
|
data.condition = _sourceNodeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user