mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Fix zero treated as missing value in resource locator (#4612)
* 🐛 Adding a type guard to validate resource locator parameter values * ✔️ Fixing a linting error Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
committed by
GitHub
parent
53d2526cd1
commit
b0bbcf6028
@@ -38,6 +38,7 @@ import {
|
||||
NodeParameterValue,
|
||||
WebhookHttpMethod,
|
||||
} from './Interfaces';
|
||||
import { isValidResourceLocatorParameterValue } from './type-guards';
|
||||
import { deepCopy } from './utils';
|
||||
|
||||
import type { Workflow } from './Workflow';
|
||||
@@ -1150,7 +1151,7 @@ export function addToIssuesIfMissing(
|
||||
(nodeProperties.type === 'dateTime' && value === undefined) ||
|
||||
(nodeProperties.type === 'options' && (value === '' || value === undefined)) ||
|
||||
(nodeProperties.type === 'resourceLocator' &&
|
||||
(!value || (typeof value === 'object' && !value.value)))
|
||||
!isValidResourceLocatorParameterValue(value as INodeParameterResourceLocator))
|
||||
) {
|
||||
// Parameter is required but empty
|
||||
if (foundIssues.parameters === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user