Skip to content

Commit 741f9ed

Browse files
committed
bugfix: image/file field in repeater
1 parent ac3e69f commit 741f9ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Fields/Converters/FileConverter.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ public function toDisplayValue(mixed $sourceValue, ?string $locale, ?string $fal
2323
}
2424

2525
return collect($sourceValue)
26-
->map(fn ($path) => FileDto::fromArray([
27-
'path' => $path,
26+
->map(fn ($v) => $v instanceof FileDto ? $v : FileDto::fromArray([
27+
'path' => $v,
2828
'disk' => $disk,
2929
'directory' => $directory,
3030
]))
31-
->values()
3231
->all();
3332

3433
} catch (\Throwable $th) {

0 commit comments

Comments
 (0)