refactor: Add lint rule for unsafe property access with lodash get/set (no-changelog) (#8587)
This commit is contained in:
@@ -2548,7 +2548,7 @@ const addExecutionDataFunctions = async (
|
||||
runExecutionData.executionData!.metadata = {};
|
||||
}
|
||||
|
||||
let sourceTaskData = get(runExecutionData, `executionData.metadata[${sourceNodeName}]`);
|
||||
let sourceTaskData = get(runExecutionData, ['executionData', 'metadata', sourceNodeName]);
|
||||
|
||||
if (!sourceTaskData) {
|
||||
runExecutionData.executionData!.metadata[sourceNodeName] = [];
|
||||
|
||||
@@ -337,10 +337,13 @@ export class WorkflowExecute {
|
||||
): boolean {
|
||||
// for (const inputConnection of workflow.connectionsByDestinationNode[nodeToAdd].main[0]) {
|
||||
for (const inputConnection of inputConnections) {
|
||||
const nodeIncomingData = get(
|
||||
runData,
|
||||
`[${inputConnection.node}][${runIndex}].data.main[${inputConnection.index}]`,
|
||||
);
|
||||
const nodeIncomingData = get(runData, [
|
||||
inputConnection.node,
|
||||
runIndex,
|
||||
'data',
|
||||
'main',
|
||||
inputConnection.index,
|
||||
]);
|
||||
if (nodeIncomingData !== undefined && (nodeIncomingData as object[]).length !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user