refactor(core): Extract duplicate utility functions and add unit tests (no-changelog) (#9814)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-20 12:09:23 +02:00
committed by GitHub
parent 283d1ca583
commit e4463c62b4
14 changed files with 207 additions and 199 deletions

View File

@@ -12,7 +12,7 @@ import get from 'lodash/get';
import { placeholder } from './placeholder';
import { getValue } from './utils';
import type { IValueData } from './types';
import { getResolvables, sanitazeDataPathKey } from '@utils/utilities';
import { getResolvables, sanitizeDataPathKey } from '@utils/utilities';
export const capitalizeHeader = (header: string, capitalize?: boolean) => {
if (!capitalize) return header;
@@ -516,7 +516,7 @@ export class Html implements INodeType {
let htmlArray: string[] | string = [];
if (sourceData === 'json') {
if (nodeVersion === 1) {
const key = sanitazeDataPathKey(item.json, dataPropertyName);
const key = sanitizeDataPathKey(item.json, dataPropertyName);
if (item.json[key] === undefined) {
throw new NodeOperationError(
this.getNode(),