Skip to content

Commit 7334f90

Browse files
committed
Resolve inadvertent overwrite of Value, InheritedValue
In #e88dee0, I resolved a bug where the optional `Value` and `InheritedValue` constructor parameters weren't being processed. This fixed that issue, but resolved a new one: The default inherited values used when these were null, as assigned by the base `AttributeViewModel` constructor, were being overwritten. Whoops. This is fixed by checking them for nulls.
1 parent d9a0ce8 commit 7334f90

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

OnTopic.Editor.Models/AttributeViewModel{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public AttributeViewModel(
3232
attributeDescriptor
3333
) {
3434
AttributeDescriptor = attributeDescriptor;
35-
Value = value;
36-
InheritedValue = inheritedValue;
35+
Value = value?? Value;
36+
InheritedValue = inheritedValue?? InheritedValue;
3737
}
3838

3939
/*==========================================================================================================================

0 commit comments

Comments
 (0)