Skip to content

Commit

Permalink
logic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 22, 2024
1 parent 6fa6319 commit e2257a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion system/src/Grav/Framework/Flex/FlexCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ public function render(string $layout = null, array $context = [])
] + $context
);

if ($debugger->enabled() && ($grav['uri']->getContentType() !== 'application/json' || $grav['uri']->extension() !== 'json')) {
if ($debugger->enabled() &&
!($grav['uri']->getContentType() === 'application/json' || $grav['uri']->extension() === 'json')) {
$output = "\n<!–– START {$type} collection ––>\n{$output}\n<!–– END {$type} collection ––>\n";
}

Expand Down
3 changes: 2 additions & 1 deletion system/src/Grav/Framework/Flex/FlexObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ public function render(string $layout = null, array $context = [])
] + $context
);

if ($debugger->enabled() && ($grav['uri']->getContentType() !== 'application/json' || $grav['uri']->extension() !== 'json')) {
if ($debugger->enabled() &&
!($grav['uri']->getContentType() === 'application/json' || $grav['uri']->extension() === 'json')) {
$name = $this->getKey() . ' (' . $type . ')';
$output = "\n<!–– START {$name} object ––>\n{$output}\n<!–– END {$name} object ––>\n";
}
Expand Down

0 comments on commit e2257a9

Please sign in to comment.