Add additional null checks on GridPropertyEditor in case it's executed in the front end context without CurrentUser

This commit is contained in:
Jeavon
2019-10-21 10:10:08 +01:00
committed by Bjarke Berg
parent bce5b49740
commit 5e299d7880

View File

@@ -89,7 +89,7 @@ namespace Umbraco.Web.PropertyEditors
var grid = DeserializeGridValue(rawJson, out var rtes);
var userId = _umbracoContextAccessor.UmbracoContext?.Security.CurrentUser.Id ?? Constants.Security.SuperUserId;
var userId = _umbracoContextAccessor.UmbracoContext?.Security?.CurrentUser?.Id ?? Constants.Security.SuperUserId;
//process the rte values
foreach (var rte in rtes)