Fix ContentTreeController

This commit is contained in:
Stephan
2018-05-29 12:51:18 +02:00
parent a7ba4a155e
commit ac04abe59b

View File

@@ -47,10 +47,10 @@ namespace Umbraco.Web.Trees
/// <inheritdoc />
protected override TreeNode GetSingleTreeNode(IEntitySlim entity, string parentId, FormDataCollection queryStrings)
{
var langId = queryStrings["culture"].TryConvertTo<string>();
var langId = queryStrings?["culture"];
var allowedUserOptions = GetAllowedUserMenuItemsForNode(entity);
if (CanUserAccessNode(entity, allowedUserOptions, langId.Success ? langId.Result : null))
if (CanUserAccessNode(entity, allowedUserOptions, langId))
{
//Special check to see if it ia a container, if so then we'll hide children.
var isContainer = entity.IsContainer; // && (queryStrings.Get("isDialog") != "true");