Add additional null conditionals as this method is sometimes called for front end rendering where this is no current user (DTGE)

This commit is contained in:
Jeavon
2019-10-17 17:26:32 +01:00
committed by Bjarke Berg
parent bbb1328f2c
commit bce5b49740

View File

@@ -114,7 +114,7 @@ namespace Umbraco.Web.PropertyEditors
if (editorValue.Value == null)
return null;
var userId = _umbracoContextAccessor.UmbracoContext?.Security.CurrentUser.Id ?? Constants.Security.SuperUserId;
var userId = _umbracoContextAccessor.UmbracoContext?.Security?.CurrentUser?.Id ?? Constants.Security.SuperUserId;
var config = editorValue.DataTypeConfiguration as RichTextConfiguration;
var mediaParent = config?.MediaParentId;