From c51970d3092ecce5d4982195b9176aa9fda0b58f Mon Sep 17 00:00:00 2001 From: Quentin Date: Sun, 10 Nov 2024 16:22:30 +0100 Subject: [PATCH] React/Sonar: void should not be used --- .../generator/client/react/i18n/src/main/webapp/app/i18n.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts b/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts index 7c8b4967634..34d2c39109c 100644 --- a/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts +++ b/src/main/resources/generator/client/react/i18n/src/main/webapp/app/i18n.ts @@ -4,7 +4,7 @@ import { initReactI18next } from 'react-i18next'; import LanguageDetector from 'i18next-browser-languagedetector'; import Backend from 'i18next-http-backend'; -void i18n +i18n .use(Backend) .use(LanguageDetector) .use(initReactI18next) @@ -19,6 +19,9 @@ void i18n backend: { loadPath: '../assets/locales/{{ lng }}/{{ ns }}.json', }, + }) + .catch(error => { + console.error('i18n initialization failed', error); }); export default i18n;