fix(04): fix type validation in all Switch nodes with number comparisons
Fixed Check Match Count and Check Update Match Count nodes:
- Changed typeValidation from 'strict' to 'loose'
- Changed rightValue from strings ('0', '1') to numbers (0, 1)
- Removed empty leftValue from options
This fixes 'Wrong type: string but expecting number' errors.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+16
-24
@@ -433,14 +433,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-negative",
|
"id": "count-negative",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "0",
|
"rightValue": 0,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "lt"
|
"operation": "lt"
|
||||||
@@ -456,14 +455,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-zero",
|
"id": "count-zero",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "0",
|
"rightValue": 0,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "equals"
|
"operation": "equals"
|
||||||
@@ -479,14 +477,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-one",
|
"id": "count-one",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "1",
|
"rightValue": 1,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "equals"
|
"operation": "equals"
|
||||||
@@ -502,14 +499,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-gt-one",
|
"id": "count-gt-one",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "1",
|
"rightValue": 1,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "gt"
|
"operation": "gt"
|
||||||
@@ -1296,14 +1292,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-negative",
|
"id": "count-negative",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "0",
|
"rightValue": 0,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "lt"
|
"operation": "lt"
|
||||||
@@ -1320,14 +1315,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-zero",
|
"id": "count-zero",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "0",
|
"rightValue": 0,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "equals"
|
"operation": "equals"
|
||||||
@@ -1344,14 +1338,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-one",
|
"id": "count-one",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "1",
|
"rightValue": 1,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "equals"
|
"operation": "equals"
|
||||||
@@ -1368,14 +1361,13 @@
|
|||||||
"conditions": {
|
"conditions": {
|
||||||
"options": {
|
"options": {
|
||||||
"caseSensitive": true,
|
"caseSensitive": true,
|
||||||
"leftValue": "",
|
"typeValidation": "loose"
|
||||||
"typeValidation": "strict"
|
|
||||||
},
|
},
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"id": "count-gt-one",
|
"id": "count-gt-one",
|
||||||
"leftValue": "={{ $json.matchCount }}",
|
"leftValue": "={{ $json.matchCount }}",
|
||||||
"rightValue": "1",
|
"rightValue": 1,
|
||||||
"operator": {
|
"operator": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"operation": "gt"
|
"operation": "gt"
|
||||||
|
|||||||
Reference in New Issue
Block a user