Skip to content

Commit 332c108

Browse files
committed
fix dot
1 parent 9a92480 commit 332c108

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Collections/PhpTranslations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function only($keys)
177177
public static function toDot(array $values): static
178178
{
179179
return new static(
180-
Arr::dot(static::prepareTranslations($values))
180+
Arr::dot(static::prepareTranslations($values) ?? [])
181181
);
182182
}
183183

@@ -189,7 +189,7 @@ public static function toUndot(Translations|array $translations): array
189189
{
190190
$translations = $translations instanceof Translations ? $translations->all() : $translations;
191191

192-
return static::unprepareTranslations(Arr::undot((array) $translations));
192+
return static::unprepareTranslations(Arr::undot($translations));
193193
}
194194

195195
/**

0 commit comments

Comments
 (0)