mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): extraneous vars in makeConnectionErrorSelector
This commit is contained in:
@ -36,8 +36,6 @@ export const makeConnectionErrorSelector = (
|
|||||||
return i18n.t('nodes.noConnectionInProgress');
|
return i18n.t('nodes.noConnectionInProgress');
|
||||||
}
|
}
|
||||||
|
|
||||||
const connectionNodeId = pendingConnection.node.id;
|
|
||||||
const connectionFieldName = pendingConnection.fieldTemplate.name;
|
|
||||||
const connectionHandleType = pendingConnection.fieldTemplate.fieldKind === 'input' ? 'target' : 'source';
|
const connectionHandleType = pendingConnection.fieldTemplate.fieldKind === 'input' ? 'target' : 'source';
|
||||||
|
|
||||||
if (handleType === connectionHandleType) {
|
if (handleType === connectionHandleType) {
|
||||||
@ -48,10 +46,10 @@ export const makeConnectionErrorSelector = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we have to figure out which is the target and which is the source
|
// we have to figure out which is the target and which is the source
|
||||||
const source = handleType === 'source' ? nodeId : connectionNodeId;
|
const source = handleType === 'source' ? nodeId : pendingConnection.node.id;
|
||||||
const sourceHandle = handleType === 'source' ? fieldName : connectionFieldName;
|
const sourceHandle = handleType === 'source' ? fieldName : pendingConnection.fieldTemplate.name;
|
||||||
const target = handleType === 'target' ? nodeId : connectionNodeId;
|
const target = handleType === 'target' ? nodeId : pendingConnection.node.id;
|
||||||
const targetHandle = handleType === 'target' ? fieldName : connectionFieldName;
|
const targetHandle = handleType === 'target' ? fieldName : pendingConnection.fieldTemplate.name;
|
||||||
|
|
||||||
const validationResult = validateConnection(
|
const validationResult = validateConnection(
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user