Skip to content

Commit

Permalink
Merge pull request neos#1713 from neos/dimaip-fix-isFullyLoaded
Browse files Browse the repository at this point in the history
BUGFIX: fix race condition when merging tree nodes
  • Loading branch information
dimaip authored Mar 22, 2018
2 parents f8a9991 + 17f88e9 commit 3397818
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Neos/Neos/Ui/Fusion/Helper/NodeInfoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public function renderNode(NodeInterface $node, ControllerContext $controllerCon
'name' => $node->getName(),
'identifier' => $node->getIdentifier(),
'nodeType' => $node->getNodeType()->getName(),
'isFullyLoaded' => !$omitMostPropertiesForTreeState,
'properties' => $omitMostPropertiesForTreeState ? [
// if we are only rendering the tree state, ensure _isHidden is sent to hidden nodes are correctly shown in the tree.
'_hidden' => $node->isHidden()
Expand All @@ -104,6 +103,10 @@ public function renderNode(NodeInterface $node, ControllerContext $controllerCon
// TODO: 'uri' =>@if.onyRenderWhenNodeIsADocument = ${q(node).is('[instanceof Neos.Neos:Document]')}
'children' => [],
];
// It's important to not set `isFullyLoaded` to false by default, so the state would get merged correctly
if (!$omitMostPropertiesForTreeState) {
$nodeInfo['isFullyLoaded'] = true;
}
if ($controllerContext !== null && $node->getNodeType()->isOfType($this->documentNodeTypeRole)) {
$nodeInfo['uri'] = $this->uri($node, $controllerContext);

Expand Down

0 comments on commit 3397818

Please sign in to comment.