diff --git a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java index 2bedcb0..5cb960f 100644 --- a/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java +++ b/magnolia-dictionary/src/main/java/com/namics/oss/magnolia/dictionary/i18nsystem/DictionaryTranslationServiceImpl.java @@ -104,7 +104,7 @@ protected Optional doGetMessage(final String[] keys, final Locale locale } private Optional getSiteFallbackLocale() { - return Optional.of(siteManager.getCurrentSite()) + return Optional.ofNullable(siteManager.getCurrentSite()) .map(Site::getI18n) .map(I18nContentSupport::getFallbackLocale); }