Skip to content

Commit a1da286

Browse files
MC-41854: Page builder gallery load issue
1 parent d3ceddb commit a1da286

File tree

1 file changed

+2
-3
lines changed
  • app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images

1 file changed

+2
-3
lines changed

app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public function getTreeJson()
7676
'path' => substr($item->getFilename(), strlen($storageRoot)),
7777
'cls' => 'folder',
7878
];
79-
$nestedDirectories = $this->getFilteredNestedDirectories($storageRoot, $item->getFilename());
80-
$hasNestedDirectories = count($nestedDirectories) > 0;
79+
$hasNestedDirectories = $this->hasNestedDirectories($storageRoot, $item->getFilename());
8180

8281
// if no nested directories inside dir, add 'leaf' state so that jstree hides dropdown arrow next to dir
8382
if (!$hasNestedDirectories) {
@@ -96,7 +95,7 @@ public function getTreeJson()
9695
* @param string $fileName
9796
* @return array
9897
*/
99-
private function getFilteredNestedDirectories(string $storageRoot, string $fileName): array
98+
private function hasNestedDirectories(string $storageRoot, string $fileName): array
10099
{
101100
$result = [];
102101
$pathList = $this->getMediaDirectory()->read($fileName);

0 commit comments

Comments
 (0)