Skip to content

Commit f5111ab

Browse files
idseefeldeshanrnh
andauthored
Update 16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-list-editor.md
Better than my proposal 😉👍 Co-authored-by: Esha Noronha <[email protected]>
1 parent 58aba78 commit f5111ab

File tree

1 file changed

+1
-1
lines changed
  • 16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor

1 file changed

+1
-1
lines changed

16/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-list-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Example:
148148
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
149149
@{
150150
var content = (ContentModels.MyElementTypeAliasOfContent)Model.Content;
151-
var settings = Model.Settings as ContentModels.MyElementTypeAliasOfContent; // using as here, fixes CS8600 - Converting null literal or possible null value to non-nullable type.
151+
var settings = Model.Settings as ContentModels.MyElementTypeAliasOfContent; // Cast Model.Settings safely using 'as' to avoid null reference exceptions
152152
}
153153

154154
@{ // Output the value of field with alias 'heading' from the Element Type selected as Content section }@

0 commit comments

Comments
 (0)