mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): fixes n8n-local-rules/no-json-parse-json-stringify warnings (#4407)
* 🔨 fixes * 🔨 set rule to error
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
deepCopy,
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
@@ -590,7 +591,7 @@ export class Markdown implements INodeType {
|
||||
|
||||
const markdownFromHTML = NodeHtmlMarkdown.translate(html, markdownOptions);
|
||||
|
||||
const newItem = JSON.parse(JSON.stringify(items[i].json));
|
||||
const newItem = deepCopy(items[i].json);
|
||||
set(newItem, destinationKey, markdownFromHTML);
|
||||
returnData.push(newItem);
|
||||
}
|
||||
@@ -605,7 +606,7 @@ export class Markdown implements INodeType {
|
||||
Object.keys(options).forEach((key) => converter.setOption(key, options[key]));
|
||||
const htmlFromMarkdown = converter.makeHtml(markdown);
|
||||
|
||||
const newItem = JSON.parse(JSON.stringify(items[i].json));
|
||||
const newItem = deepCopy(items[i].json);
|
||||
set(newItem, destinationKey, htmlFromMarkdown);
|
||||
|
||||
returnData.push(newItem);
|
||||
|
||||
Reference in New Issue
Block a user