Merge pull request #416 from saltrafael/master
Fix breaking when no languages set
This commit is contained in:
commit
508e8d36fd
2 changed files with 2 additions and 2 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue