Skip to content

Commit d340ded

Browse files
committed
Enabled nullability context for ContentTypeListViewModel
It was previously using a mixed state which resulted in a warning. Since we should be moving _toward_ nullable reference types, and we already have quite a few view models setup to use them, I went ahead and migrated this one to use `#nullable`.
1 parent 87df269 commit d340ded

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

OnTopic.Editor.AspNetCore/Models/ContentTypeListViewModel.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
using Microsoft.AspNetCore.Mvc.Rendering;
88
using OnTopic.Editor.Models;
99

10+
#nullable enable
11+
1012
namespace OnTopic.Editor.AspNetCore.Models {
1113

1214
/*============================================================================================================================
@@ -31,7 +33,7 @@ public ContentTypeListViewModel() { }
3133
/// <summary>
3234
/// Provides a reference to the <see cref="EditingTopicViewModel"/> that the user is currently editing.
3335
/// </summary>
34-
public EditingTopicViewModel CurrentTopic { get; set; }
36+
public EditingTopicViewModel? CurrentTopic { get; set; }
3537

3638
/*==========================================================================================================================
3739
| TOPIC LIST
@@ -72,7 +74,9 @@ public ContentTypeListViewModel() { }
7274
/// <summary>
7375
/// If supplied, sets a reference to a callback function to execute on close of the editor modal window.
7476
/// </summary>
75-
public string OnModalClose { get; set; }
77+
public string? OnModalClose { get; set; }
7678

7779
} // Class
7880
} // Namespace
81+
82+
#nullable disable

0 commit comments

Comments
 (0)