Skip to content

Commit

Permalink
🐛 flatten all objects
Browse files Browse the repository at this point in the history
related: getkirby/kql#7
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Mar 21, 2020
1 parent 10c20f4 commit 1c23574
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions classes/Handlebars.php
Expand Up @@ -178,6 +178,7 @@ public function kqlData(array $data, string $template, ?Page $page = null)
return $data;
}
$kqlData = \Kirby\Kql\Kql::run(Json::read($jsonFile), $page);
$kqlData = Json::decode(Json::encode($kqlData)); // flatten all objects

if ($kqlData && is_array($kqlData) && count($kqlData)) {
$data = $this->array_merge_recursive($data, ['page' => $kqlData]);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-handlebars",
"type": "kirby-plugin",
"version": "3.3.5",
"version": "3.3.6",
"license": "MIT",
"description": "Kirby 3 Component for semantic templates with Handlebars and Mustache",
"authors": [
Expand Down

0 comments on commit 1c23574

Please sign in to comment.