From a6d1e5aeb81a6dce383e4b0d5e4a7d5e48b61dc0 Mon Sep 17 00:00:00 2001 From: Stephen Fraser Date: Wed, 18 May 2022 11:13:21 +0100 Subject: [PATCH] v2.0.7 --- CHANGELOG.md | 5 +++- .../src/middleware/i18n/i18next.client.ts | 26 +++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 942b9879c..4c76e4581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/digirati-co-uk/madoc-platform/compare/v2.0.6...main) +## [Unreleased](https://github.com/digirati-co-uk/madoc-platform/compare/v2.0.7...main) +## [2.0.7](https://github.com/digirati-co-uk/madoc-platform/releases/tag/v2.0.7) - 2022-05-18 +This is a hot fix release. + ## [2.0.6](https://github.com/digirati-co-uk/madoc-platform/releases/tag/v2.0.6) - 2022-05-16 This is a hot fix release. diff --git a/services/madoc-ts/src/middleware/i18n/i18next.client.ts b/services/madoc-ts/src/middleware/i18n/i18next.client.ts index 1e7943fe6..d547973a2 100644 --- a/services/madoc-ts/src/middleware/i18n/i18next.client.ts +++ b/services/madoc-ts/src/middleware/i18n/i18next.client.ts @@ -38,20 +38,18 @@ export async function createBackend(slug: string, jwt?: string, languages?: stri ].filter(Boolean), backendOptions: [ process.env.NODE_ENV === 'production' ? {} : null, // primary - process.env.NODE_ENV !== 'production' - ? { - loadPath: `/s/${slug}/madoc/api/locales/{{lng}}/{{ns}}`, // xhr load path for my own fallback - addPath: `/s/${slug}/madoc/api/locales/{{lng}}/{{ns}}`, // xhr load path for my own fallback - customHeaders: jwt - ? { - Accept: 'application/json', - Authorization: `Bearer ${jwt}`, - } - : { - Accept: 'application/json', - }, - } - : null, + { + loadPath: `/s/${slug}/madoc/api/locales/{{lng}}/{{ns}}`, // xhr load path for my own fallback + addPath: `/s/${slug}/madoc/api/locales/{{lng}}/{{ns}}`, // xhr load path for my own fallback + customHeaders: jwt + ? { + Accept: 'application/json', + Authorization: `Bearer ${jwt}`, + } + : { + Accept: 'application/json', + }, + }, ].filter(Boolean), }, });