Skip to content

Commit

Permalink
extract data before flattening on Mustache::data()
Browse files Browse the repository at this point in the history
  • Loading branch information
d1rk committed Aug 29, 2013
1 parent 3ecfd7c commit 0025776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/helper/Mustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function data(array $data = array(), array $options = array()) {
$defaults = array('flatten' => true);
$options += $defaults;
if ($options['flatten']) {
$data = Set::flatten($data);
$data = Set::flatten($this->_extract($data));
}
return array_map(function($key, $value) {
return compact('key', 'value');
Expand Down

0 comments on commit 0025776

Please sign in to comment.