Skip to content

Commit

Permalink
fix(issue editor): Don’t break on missing languages in meta
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff committed May 27, 2020
1 parent fbe3da4 commit 4b7944f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/issue-editor/meta/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const MetaLanguagesEditor: React.FC<MetaEditorProps<MetaLanguages>> = function (
onChange(newData);
}

const langs = data.languages || {};
const langs = data.languages || { en: true };

return <div className={styles.metaLanguagesPane}>
<FormGroup
Expand Down Expand Up @@ -90,7 +90,7 @@ const MetaLanguagesEditor: React.FC<MetaEditorProps<MetaLanguages>> = function (
lang.select(evt.currentTarget.value);
}}
value={lang.selected}
options={Object.keys(data.languages).map(langID =>
options={Object.keys(langs).map(langID =>
({ label: lang.available[langID], value: langID }))} />
</FormGroup>
</div>;
Expand Down

0 comments on commit 4b7944f

Please sign in to comment.