mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
fix(editor): Fix failing non-null assertion in useDataSchema:getNodeInputData (no-changelog) (#11807)
This commit is contained in:
@@ -72,12 +72,13 @@ export function useDataSchema() {
|
||||
if (
|
||||
!connectionsData?.hasOwnProperty(NodeConnectionType.Main) ||
|
||||
connectionsData.main === undefined ||
|
||||
connectionsData.main.length < outputIndex ||
|
||||
outputIndex < 0 ||
|
||||
outputIndex >= connectionsData.main.length ||
|
||||
connectionsData.main[outputIndex] === null
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
return connectionsData.main[outputIndex] as INodeExecutionData[];
|
||||
return connectionsData.main[outputIndex];
|
||||
}
|
||||
|
||||
function getNodeInputData(
|
||||
@@ -100,11 +101,12 @@ export function useDataSchema() {
|
||||
}
|
||||
const runData = executionData.resultData.runData;
|
||||
|
||||
if (!runData?.[node.name]?.[runIndex].data || runData[node.name][runIndex].data === undefined) {
|
||||
const taskData = runData?.[node.name]?.[runIndex];
|
||||
if (taskData?.data === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return getMainInputData(runData[node.name][runIndex].data!, outputIndex);
|
||||
return getMainInputData(taskData.data, outputIndex);
|
||||
}
|
||||
|
||||
function getInputDataWithPinned(
|
||||
|
||||
Reference in New Issue
Block a user