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": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-negative",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "0",
|
||||
"rightValue": 0,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "lt"
|
||||
@@ -456,14 +455,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-zero",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "0",
|
||||
"rightValue": 0,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "equals"
|
||||
@@ -479,14 +477,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-one",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "1",
|
||||
"rightValue": 1,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "equals"
|
||||
@@ -502,14 +499,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-gt-one",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "1",
|
||||
"rightValue": 1,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "gt"
|
||||
@@ -1296,14 +1292,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-negative",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "0",
|
||||
"rightValue": 0,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "lt"
|
||||
@@ -1320,14 +1315,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-zero",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "0",
|
||||
"rightValue": 0,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "equals"
|
||||
@@ -1344,14 +1338,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-one",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "1",
|
||||
"rightValue": 1,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "equals"
|
||||
@@ -1368,14 +1361,13 @@
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
"typeValidation": "loose"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "count-gt-one",
|
||||
"leftValue": "={{ $json.matchCount }}",
|
||||
"rightValue": "1",
|
||||
"rightValue": 1,
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "gt"
|
||||
|
||||
Reference in New Issue
Block a user