Skip to content

Commit e1d4b8d

Browse files
committed
Merge branch 'hotfix-petrzpav' into main-1
2 parents d234a99 + f110534 commit e1d4b8d

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [1.1.2] - 2025-06-11
8+
9+
### Fixed
10+
11+
- Fix formatting composite keys.
12+
713
## [1.1.1] - 2025-05-15
814

915
### Fixed
@@ -351,6 +357,7 @@ _Stable release based on [0.1.0-rc.1]._
351357

352358
- New changelog file.
353359

360+
[1.1.2]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.1.1...v1.1.2
354361
[1.1.1]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.1.0...v1.1.1
355362
[1.1.0]: https://https://github.com/internetguru/laravel-model-browser/compare/v1.0.3...v1.1.0
356363
[1.1.0-rc.1]: https://github.com/internetguru/laravel-model-browser/releases/tag/v1.0.3

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.1
1+
1.1.2

src/Components/BaseModelBrowser.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,11 @@ protected function format($data)
259259
{
260260
$data->transform(function ($item) {
261261
foreach ($this->formats as $attribute => $format) {
262-
if (! isset($item->{$attribute})) {
262+
$value = Arr::get($item, $attribute);
263+
if ($value === null) {
263264
continue;
264265
}
265-
$item->{$attribute . 'Formatted'} = $format($item->{$attribute}, $item);
266+
$item->{$attribute . 'Formatted'} = $format($value, $item);
266267
}
267268

268269
return $item;

0 commit comments

Comments
 (0)