fix: Use IF node typeVersion 1 for better compatibility

- Changed from typeVersion 2 to typeVersion 1
- typeVersion 1 is supported in older n8n versions
- Should fix 'custom node' installation error
This commit is contained in:
mindesbunister
2025-10-23 16:25:09 +02:00
parent 0b9c60774f
commit 2adab40781

View File

@@ -64,41 +64,19 @@
}, },
{ {
"parameters": { "parameters": {
"rules": {
"values": [
{
"conditions": { "conditions": {
"options": { "boolean": [
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{ {
"leftValue": "={{ $json.allowed }}", "value1": "={{ $json.allowed }}",
"rightValue": true, "value2": true
"operator": {
"type": "boolean",
"operation": "equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "allowed"
} }
] ]
},
"options": {
"fallbackOutput": "extra",
"allMatchingOutputs": false
} }
}, },
"id": "risk-check-condition", "id": "risk-check-condition",
"name": "Risk Check Passed?", "name": "Risk Check Passed?",
"type": "n8n-nodes-base.switch", "type": "n8n-nodes-base.if",
"typeVersion": 3, "typeVersion": 1,
"position": [850, 300] "position": [850, 300]
}, },
{ {
@@ -130,41 +108,19 @@
}, },
{ {
"parameters": { "parameters": {
"rules": {
"values": [
{
"conditions": { "conditions": {
"options": { "boolean": [
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{ {
"leftValue": "={{ $json.success }}", "value1": "={{ $json.success }}",
"rightValue": true, "value2": true
"operator": {
"type": "boolean",
"operation": "equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "success"
} }
] ]
},
"options": {
"fallbackOutput": "extra",
"allMatchingOutputs": false
} }
}, },
"id": "trade-success-condition", "id": "trade-success-condition",
"name": "Trade Executed Successfully?", "name": "Trade Executed Successfully?",
"type": "n8n-nodes-base.switch", "type": "n8n-nodes-base.if",
"typeVersion": 3, "typeVersion": 1,
"position": [1250, 200] "position": [1250, 200]
}, },
{ {