We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a522ab commit c2873fdCopy full SHA for c2873fd
1 file changed
OnTopic.Editor.AspNetCore/Controllers/EditorController.cs
@@ -122,8 +122,8 @@ private ContentTypeDescriptor GetContentType(string contentType) => TopicReposit
122
/// <param name="modelType"></param>
123
/// <returns></returns>
124
private ModelType GetModelType(ModelType modelType) {
125
- if (modelType == ModelType.Reflexive && CurrentTopic is AttributeDescriptor) {
126
- return ((AttributeDescriptor)CurrentTopic).ModelType;
+ if (modelType == ModelType.Reflexive && CurrentTopic is AttributeDescriptor attributeDescriptor) {
+ return attributeDescriptor.ModelType;
127
}
128
return modelType;
129
0 commit comments