refactor(core): fixes n8n-local-rules/no-json-parse-json-stringify warnings (#4407)

* 🔨 fixes

* 🔨 set rule to error
This commit is contained in:
Michael Kret
2022-10-21 18:24:58 +03:00
committed by GitHub
parent e10128cbea
commit 9d6a2c32d7
21 changed files with 75 additions and 50 deletions

View File

@@ -1,6 +1,7 @@
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
import {
deepCopy,
IDataObject,
ILoadOptionsFunctions,
INodeExecutionData,
@@ -707,7 +708,7 @@ export class SurveyMonkeyTrigger implements INodeType {
responseData.questions = {};
// Map the "Map" to JSON
const tuples = JSON.parse(JSON.stringify([...responseQuestions]));
const tuples = deepCopy([...responseQuestions]);
for (const [key, value] of tuples) {
responseData.questions[key] = value;
}