Skip to content

Commit

Permalink
fixes bug with saving stories in storyeditor
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmullen committed Feb 7, 2019
1 parent 10a8cd2 commit 662f03e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/cms/src/story/StoryEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ class StoryEditor extends Component {
}

onSave(minData) {
if (this.props.reportSave) this.props.reportSave("story", minData.id, minData.title);
console.log(minData);
const {localeDefault} = this.props;
const defCon = minData.content.find(c => c.lang === localeDefault);
const title = defCon && defCon.title ? defCon.title : minData.slug;
if (this.props.reportSave) this.props.reportSave("story", minData.id, title);
}

setDate(date) {
Expand Down

0 comments on commit 662f03e

Please sign in to comment.