Merge pull request #416 from saltrafael/master

Fix breaking when no languages set
This commit is contained in:
Thomas Zarebczan 2021-06-14 11:13:06 -04:00 committed by GitHub
commit 508e8d36fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
dist/bundle.es.js vendored
View file

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

View file

@ -44,7 +44,7 @@ export const selectPublishFormValues = createSelector(
selectIsStillEditing,
(publishState, settingsState, isStillEditing) => {
const { languages, ...formValues } = publishState;
const language = languages[0];
const language = languages && languages.length && languages[0];
const { clientSettings } = settingsState;
const { language: languageSet } = clientSettings;