@seamly/web-ui 23.0.0-alpha.1 → 23.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1912,12 +1912,14 @@ const initializeApp = (0,redux_toolkit_modern/* createAsyncThunk */.aw)('initial
1912
1912
  rejectWithValue
1913
1913
  }) => __awaiter(void 0, void 0, void 0, function* () {
1914
1914
  var _a, _b, _c;
1915
- const contentLocale = (_a = config === null || config === void 0 ? void 0 : config.context) === null || _a === void 0 ? void 0 : _a.contentLocale;
1916
- const userLocale = (_b = config === null || config === void 0 ? void 0 : config.context) === null || _b === void 0 ? void 0 : _b.userLocale;
1915
+ let contentLocale = (_a = config === null || config === void 0 ? void 0 : config.context) === null || _a === void 0 ? void 0 : _a.contentLocale;
1916
+ let userLocale = (_b = config === null || config === void 0 ? void 0 : config.context) === null || _b === void 0 ? void 0 : _b.userLocale;
1917
1917
  const environment = config.api.sendEnvironment !== false ? api.getEnvironment() : config.api.sendEnvironment;
1918
1918
  try {
1919
1919
  if (api.hasConversation()) {
1920
1920
  const initialState = yield api.getConversationIntitialState();
1921
+ contentLocale = initialState.context.contentLocale || contentLocale;
1922
+ userLocale = initialState.context.userLocale || userLocale;
1921
1923
  api.sendContext(Object.assign(Object.assign({}, initialState.context), {
1922
1924
  environment
1923
1925
  }));
@@ -3757,7 +3759,9 @@ const middleware_createI18nMiddleware = ({
3757
3759
  }
3758
3760
  }
3759
3761
  if (initializeApp.fulfilled.match(action)) {
3760
- dispatch(setLocale(action.payload.contentLocale));
3762
+ if (action.payload.contentLocale) {
3763
+ dispatch(setLocale(action.payload.contentLocale));
3764
+ }
3761
3765
  return result;
3762
3766
  }
3763
3767
  if (addEvent.match(action)) {