Merge pull request #1427 from hmhealey/attachmentnullfix-1.2
(1.2) Added null check when accessing post text
Этот коммит содержится в:
@@ -50,7 +50,8 @@ export default class PostAttachment extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldCollapse() {
|
shouldCollapse() {
|
||||||
return (this.props.attachment.text.match(/\n/g) || []).length >= 5 || this.props.attachment.text.length > 700;
|
const text = this.props.attachment.text || '';
|
||||||
|
return (text.match(/\n/g) || []).length >= 5 || text.length > 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCollapsedText() {
|
getCollapsedText() {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user