mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
addressing comments
This commit is contained in:
parent
0e532992bd
commit
f131e9381a
|
@ -1,5 +1,5 @@
|
|||
import { get } from 'lodash';
|
||||
import { ApplicationError, deepCopy, Workflow } from 'n8n-workflow';
|
||||
import { ApplicationError, Workflow } from 'n8n-workflow';
|
||||
import type {
|
||||
INodeParameterResourceLocator,
|
||||
IWorkflowExecuteAdditionalData,
|
||||
|
|
|
@ -244,9 +244,8 @@ async function loadFieldsToMap(): Promise<void> {
|
|||
return;
|
||||
}
|
||||
|
||||
const resourceMapperMethod = props.parameter.typeOptions?.resourceMapper?.resourceMapperMethod;
|
||||
const localResourceMapperMethod =
|
||||
props.parameter.typeOptions?.resourceMapper?.localResourceMapperMethod;
|
||||
const { resourceMapperMethod = undefined, localResourceMapperMethod = undefined } =
|
||||
props.parameter.typeOptions?.resourceMapper ?? {};
|
||||
|
||||
let fetchedFields = null;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import {
|
|||
VALUES,
|
||||
TYPE_OPTIONS,
|
||||
INPUT_OPTIONS,
|
||||
DEFAULT_PLACEHOLDER,
|
||||
FALLBACK_DEFAULT_VALUE,
|
||||
} from './constants';
|
||||
|
||||
const SUPPORTED_TYPES = TYPE_OPTIONS.map((x) => x.value);
|
||||
|
@ -123,7 +123,7 @@ export function getWorkflowInputData(
|
|||
try {
|
||||
for (const { name, type } of newParams) {
|
||||
if (!item.json.hasOwnProperty(name)) {
|
||||
newItem.json[name] = DEFAULT_PLACEHOLDER;
|
||||
newItem.json[name] = FALLBACK_DEFAULT_VALUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,4 +33,4 @@ export const TYPE_OPTIONS: Array<{ name: string; value: FieldType | 'any' }> = [
|
|||
// Intentional omission of `dateTime`, `time`, `string-alphanumeric`, `form-fields`, `jwt` and `url`
|
||||
];
|
||||
|
||||
export const DEFAULT_PLACEHOLDER = null;
|
||||
export const FALLBACK_DEFAULT_VALUE = null;
|
||||
|
|
Loading…
Reference in a new issue