Fixed flow errors and small refactor
This commit is contained in:
@@ -8,7 +8,7 @@ import PublishingInfo from 'components/PublishingInfo';
|
||||
|
||||
type Props = {
|
||||
document: Document,
|
||||
highlight?: string,
|
||||
highlight?: ?string,
|
||||
innerRef?: Function,
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user