Don't reset content language on edit

This commit is contained in:
saltrafael 2021-06-09 11:32:22 -03:00
parent 609f13991f
commit 85ad697e0a
2 changed files with 5 additions and 3 deletions

5
dist/bundle.es.js vendored
View file

@ -5414,8 +5414,9 @@ const selectIsStillEditing = reselect.createSelector(selectState$4, publishState
}); });
const selectPublishFormValues = reselect.createSelector(selectState$4, state => state.settings, selectIsStillEditing, (publishState, settingsState, isStillEditing) => { const selectPublishFormValues = reselect.createSelector(selectState$4, state => state.settings, selectIsStillEditing, (publishState, settingsState, isStillEditing) => {
const { pendingPublish, language } = publishState, const { languages } = publishState,
formValues = _objectWithoutProperties$2(publishState, ['pendingPublish', 'language']); formValues = _objectWithoutProperties$2(publishState, ['languages']);
const language = languages[0];
const { clientSettings } = settingsState; const { clientSettings } = settingsState;
const { language: languageSet } = clientSettings; const { language: languageSet } = clientSettings;

View file

@ -43,7 +43,8 @@ export const selectPublishFormValues = createSelector(
state => state.settings, state => state.settings,
selectIsStillEditing, selectIsStillEditing,
(publishState, settingsState, isStillEditing) => { (publishState, settingsState, isStillEditing) => {
const { pendingPublish, language, ...formValues } = publishState; const { languages, ...formValues } = publishState;
const language = languages[0];
const { clientSettings } = settingsState; const { clientSettings } = settingsState;
const { language: languageSet } = clientSettings; const { language: languageSet } = clientSettings;