From ac651c4d502a6d831839a64f694ff02f9adca047 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 14 Aug 2022 14:41:22 +0300 Subject: [PATCH] Fix reference property resolution --- .../kotlin/space/kscience/visionforge/solid/SolidReference.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt index 07398a42..0b1bc43e 100644 --- a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt +++ b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt @@ -79,7 +79,7 @@ public class SolidReference( val stylesFlag = includeStyles ?: descriptor?.usesStyles ?: true //2. Resolve prototype onw properties - prototype.properties.getValue(name, inheritFlag, stylesFlag)?.let { return it } + prototype.properties.own?.getValue(name)?.let { return it } if (stylesFlag) { //3. own styles @@ -97,7 +97,7 @@ public class SolidReference( prototype.parent?.properties?.getValue(name, inheritFlag, includeStyles)?.let { return it } } - return null + return descriptor?.defaultValue }