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 { get } from 'lodash';
|
||||||
import { ApplicationError, deepCopy, Workflow } from 'n8n-workflow';
|
import { ApplicationError, Workflow } from 'n8n-workflow';
|
||||||
import type {
|
import type {
|
||||||
INodeParameterResourceLocator,
|
INodeParameterResourceLocator,
|
||||||
IWorkflowExecuteAdditionalData,
|
IWorkflowExecuteAdditionalData,
|
||||||
|
|
|
@ -244,9 +244,8 @@ async function loadFieldsToMap(): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const resourceMapperMethod = props.parameter.typeOptions?.resourceMapper?.resourceMapperMethod;
|
const { resourceMapperMethod = undefined, localResourceMapperMethod = undefined } =
|
||||||
const localResourceMapperMethod =
|
props.parameter.typeOptions?.resourceMapper ?? {};
|
||||||
props.parameter.typeOptions?.resourceMapper?.localResourceMapperMethod;
|
|
||||||
|
|
||||||
let fetchedFields = null;
|
let fetchedFields = null;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
VALUES,
|
VALUES,
|
||||||
TYPE_OPTIONS,
|
TYPE_OPTIONS,
|
||||||
INPUT_OPTIONS,
|
INPUT_OPTIONS,
|
||||||
DEFAULT_PLACEHOLDER,
|
FALLBACK_DEFAULT_VALUE,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
const SUPPORTED_TYPES = TYPE_OPTIONS.map((x) => x.value);
|
const SUPPORTED_TYPES = TYPE_OPTIONS.map((x) => x.value);
|
||||||
|
@ -123,7 +123,7 @@ export function getWorkflowInputData(
|
||||||
try {
|
try {
|
||||||
for (const { name, type } of newParams) {
|
for (const { name, type } of newParams) {
|
||||||
if (!item.json.hasOwnProperty(name)) {
|
if (!item.json.hasOwnProperty(name)) {
|
||||||
newItem.json[name] = DEFAULT_PLACEHOLDER;
|
newItem.json[name] = FALLBACK_DEFAULT_VALUE;
|
||||||
continue;
|
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`
|
// 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