Skip to content

Commit

Permalink
Annoying output comments fix for json Flex (getgrav#3856)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sogl authored Oct 22, 2024
1 parent e0ff168 commit d72fca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion system/src/Grav/Framework/Flex/FlexCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public function render(string $layout = null, array $context = [])
] + $context
);

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

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

if ($debugger->enabled()) {
if ($debugger->enabled() && $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 d72fca1

Please sign in to comment.