Remove assumption that a publish has a language

This commit is contained in:
Yamboy1 2020-01-19 16:21:17 +13:00 committed by GitHub
parent a93b09c6bd
commit 1a12e73c2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ export const selectPublishFormValues = createSelector(
let actualLanguage;
// Sets default if editing a claim with a set language
if (!language && isStillEditing && languages[0]) {
if (!language && isStillEditing && languages && languages[0]) {
actualLanguage = languages[0];
} else {
actualLanguage = language || 'en';