Fixed flow errors and small refactor

This commit is contained in:
Jori Lallo
2017-07-09 11:26:17 -07:00
parent d72f73ab18
commit c4b41a9e07
12 changed files with 33 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ import PublishingInfo from 'components/PublishingInfo';
type Props = {
document: Document,
highlight?: string,
highlight?: ?string,
innerRef?: Function,
};

View File

@@ -15,7 +15,7 @@ class Title extends React.Component {
render() {
let title;
if (this.props.truncate) {
title = _.truncate(this.props.content, this.props.truncate);
title = _.truncate(this.props.content, { length: this.props.truncate });
} else {
title = this.props.content;
}