Skip to content

Commit

Permalink
Update Mapper.php
Browse files Browse the repository at this point in the history
Fixed getting data issue
  • Loading branch information
uuur86 authored May 27, 2023
1 parent 003c2b3 commit f010676
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function map(StringObjects $data, array $paths, ?callable $callbac
// If the $path has a data path
if (is_string($path) && substr($path, 0, 6) === '@data/') {
$path = strlen($path) > 6 ? substr($path, 6) : '';
$value = $this->get($path, '');
$value = $data->get($path, '');
}

$return[$key] = empty($callback) ? $value : $callback($key, $value);
Expand Down

0 comments on commit f010676

Please sign in to comment.