diff --git a/system/src/Grav/Framework/Flex/FlexCollection.php b/system/src/Grav/Framework/Flex/FlexCollection.php index 9d9fc477cb..68110a6451 100644 --- a/system/src/Grav/Framework/Flex/FlexCollection.php +++ b/system/src/Grav/Framework/Flex/FlexCollection.php @@ -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\n{$output}\n\n"; } diff --git a/system/src/Grav/Framework/Flex/FlexObject.php b/system/src/Grav/Framework/Flex/FlexObject.php index b93b6f219f..5cf838d63b 100644 --- a/system/src/Grav/Framework/Flex/FlexObject.php +++ b/system/src/Grav/Framework/Flex/FlexObject.php @@ -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\n{$output}\n\n"; }