mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
refactor(core): fix for no-uncaught-json-parse warnings
This commit is contained in:
@@ -112,6 +112,7 @@ import {
|
||||
IRunData,
|
||||
IRunExecutionData,
|
||||
Workflow,
|
||||
jsonParse,
|
||||
} from 'n8n-workflow';
|
||||
import { IExecutionResponse, INodeUi, IUpdateInformation, TargetItem } from '../Interface';
|
||||
|
||||
@@ -554,7 +555,7 @@ export default mixins(
|
||||
return;
|
||||
}
|
||||
|
||||
this.$store.commit('pinData', { node: this.activeNode, data: JSON.parse(value) });
|
||||
this.$store.commit('pinData', { node: this.activeNode, data: jsonParse(value) });
|
||||
}
|
||||
|
||||
this.$store.commit('ui/setOutputPanelEditModeEnabled', false);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { CORE_NODES_CATEGORY, ERROR_TRIGGER_NODE_TYPE, MAPPING_PARAMS, TEMPLATES
|
||||
import { INodeUi, ITemplatesNode } from '@/Interface';
|
||||
import { isResourceLocatorValue } from '@/typeGuards';
|
||||
import dateformat from 'dateformat';
|
||||
import {IDataObject, INodeProperties, INodeTypeDescription, NodeParameterValueType,INodeExecutionData} from 'n8n-workflow';
|
||||
import {IDataObject, INodeProperties, INodeTypeDescription, NodeParameterValueType,INodeExecutionData, parseJson} from 'n8n-workflow';
|
||||
import { isJsonKeyObject } from "@/utils";
|
||||
|
||||
const CRED_KEYWORDS_TO_FILTER = ['API', 'OAuth1', 'OAuth2'];
|
||||
@@ -169,7 +169,7 @@ export const convertPath = (path: string): string => {
|
||||
};
|
||||
|
||||
export const clearJsonKey = (userInput: string | object) => {
|
||||
const parsedUserInput = typeof userInput === 'string' ? JSON.parse(userInput) : userInput;
|
||||
const parsedUserInput = typeof userInput === 'string' ? jsonParse(userInput) : userInput;
|
||||
|
||||
if (!Array.isArray(parsedUserInput)) return parsedUserInput;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user