From eac1f85cb05499d708f1b887d460603440dd1ce2 Mon Sep 17 00:00:00 2001 From: Bozhidar Hristov Date: Fri, 27 Dec 2024 09:56:41 +0200 Subject: [PATCH] Fix bizarre bug where originalCatalogue is missing --- src/Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Translator.php b/src/Translator.php index 9d90d6a..ddce46b 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -91,7 +91,7 @@ public function reset(): void } foreach (array_keys($this->catalogues) as $locale) { - $catalogue = $this->catalogues[$locale] = clone $this->originalCatalogues[$locale]; + $catalogue = $this->catalogues[$locale] = clone($this->originalCatalogues[$locale] ?? $this->catalogues[$locale]); $translations = $this->repository->findByLocale($locale); foreach ($translations as $translation) {