Fix creating polls outside of threads (#7711)

This commit is contained in:
Michael Telatynski 2022-02-03 11:50:07 +00:00 committed by GitHub
parent 9adfdb8fed
commit 226ccfc45c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -321,7 +321,7 @@ class PollButton extends React.PureComponent<IPollButtonProps> {
}, },
); );
} else { } else {
const threadId = this.props.relation.rel_type === RelationType.Thread const threadId = this.props.relation?.rel_type === RelationType.Thread
? this.props.relation.event_id ? this.props.relation.event_id
: null; : null;