Skip to content

Commit f052171

Browse files
[Grid] Fix conditions of adding actions
1 parent 85231a6 commit f052171

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Grid/Checker/ExportableChecker.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ public function canBeExported(Grid $grid, object|string|null $section): bool
3232
return false;
3333
}
3434

35-
if (null === $section) {
36-
return true;
37-
}
38-
3935
$resourceAlias = $this->resourceRegistry->getByClass($resourceClass)->getAlias();
4036

4137
$resourceConfig = $this->exportResourcesConfig[$resourceAlias] ?? false;
4238
if (false === $resourceConfig) {
4339
return false;
4440
}
4541

42+
if (null === $section) {
43+
return true;
44+
}
45+
4646
foreach ($resourceConfig['sections'] as $configSection) {
4747
if (is_a($section, $configSection, true) || $section === $configSection) {
4848
return true;

0 commit comments

Comments
 (0)