Links fixed

This commit is contained in:
barsdeveloper
2022-03-15 20:05:20 +01:00
parent b2270244a4
commit a177faf918
9 changed files with 1192 additions and 1102 deletions

View File

@@ -71,13 +71,13 @@ export default class PinEntity extends IEntity {
linkTo(targetObjectName, targetPinEntity) {
/** @type {PinReferenceEntity[]} */
this.LinkedTo
const pinExists = !this.LinkedTo.find(
const linkExists = this.LinkedTo.find(
/** @type {PinReferenceEntity} */
pinReferenceEntity => {
return pinReferenceEntity.objectName == targetObjectName
&& pinReferenceEntity.pinGuid == targetPinEntity.PinId
})
if (pinExists) {
if (!linkExists) {
this.LinkedTo.push(new PinReferenceEntity({
objectName: targetObjectName,
pinGuid: targetPinEntity.PinId