File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ public function getTreeJson()
76
76
'path ' => substr ($ item ->getFilename (), strlen ($ storageRoot )),
77
77
'cls ' => 'folder ' ,
78
78
];
79
- $ nestedDirectories = $ this ->getFilteredNestedDirectories ($ storageRoot , $ item ->getFilename ());
80
- $ hasNestedDirectories = count ($ nestedDirectories ) > 0 ;
79
+ $ hasNestedDirectories = $ this ->hasNestedDirectories ($ storageRoot , $ item ->getFilename ());
81
80
82
81
// if no nested directories inside dir, add 'leaf' state so that jstree hides dropdown arrow next to dir
83
82
if (!$ hasNestedDirectories ) {
@@ -96,7 +95,7 @@ public function getTreeJson()
96
95
* @param string $fileName
97
96
* @return array
98
97
*/
99
- private function getFilteredNestedDirectories (string $ storageRoot , string $ fileName ): array
98
+ private function hasNestedDirectories (string $ storageRoot , string $ fileName ): array
100
99
{
101
100
$ result = [];
102
101
$ pathList = $ this ->getMediaDirectory ()->read ($ fileName );
You can’t perform that action at this time.
0 commit comments