Fix index mistake

This commit is contained in:
barsdeveloper
2022-03-15 20:47:38 +01:00
parent a177faf918
commit 391a537a78
3 changed files with 63 additions and 22 deletions

View File

@@ -44,7 +44,7 @@ export default class PinTemplate extends ITemplate {
window.customElements.whenDefined(NodeElement.tagName).then(pin.nodeElement = pin.closest(NodeElement.tagName))
pin.getLinks().forEach(pinReference => {
const targetPin = pin.blueprint.getPin(pinReference.pinGuid)
if (linkedToPin) {
if (targetPin) {
const [sourcePin, destinationPin] = pin.isOutput() ? [pin, targetPin] : [targetPin, pin]
pin.blueprint.addGraphElement(new LinkElement(sourcePin, destinationPin))
}