Skip to content

Commit 3d34d38

Browse files
committed
fix(model-sync-lib): fixed export of references
1 parent 38e2735 commit 3d34d38

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

model-sync-lib/src/commonMain/kotlin/org/modelix/model/sync/ModelExporter.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ fun INode.asExported() : NodeData {
2424
role = roleInParent,
2525
properties = getPropertyRoles().associateWithNotNull { getPropertyValue(it) }.filterKeys { it != idKey },
2626
references = getReferenceRoles().associateWithNotNull {
27-
getReferenceTarget(it)?.let { node ->
28-
node.getPropertyValue(idKey) ?: node.reference.serialize()
29-
}
27+
getReferenceTarget(it)?.getPropertyValue(idKey) ?: getReferenceTargetRef(it)?.serialize()
3028
},
3129
children = allChildren.map { it.asExported() }
3230
)

0 commit comments

Comments
 (0)