Skip to content

Commit

Permalink
Define handleFormattedTextClick as an arrow function (mattermost#4992)
Browse files Browse the repository at this point in the history
* Define handleFormattedTextClick as an arrow function

* Resolve MR comments

Co-authored-by: Nevyana <[email protected]>
  • Loading branch information
nevyangelova and Nevyana authored Mar 8, 2020
1 parent e9ae037 commit 11872ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions components/channel_header/channel_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,7 @@ class ChannelHeader extends React.PureComponent {
actions.openModal(modalData);
}

handleFormattedTextClick(e) {
Utils.handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);
}
handleFormattedTextClick = (e) => Utils.handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);

render() {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import truncate from 'lodash/truncate';

import {isUrlSafe} from 'utils/url';
import {Constants} from 'utils/constants';
import {handleFormattedTextClick} from 'utils/utils';
import * as Utils from 'utils/utils';

import ExternalImage from 'components/external_image';
import Markdown from 'components/markdown';
Expand Down Expand Up @@ -242,9 +242,7 @@ export default class MessageAttachment extends React.PureComponent {
);
};

handleFormattedTextClick(e) {
handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);
}
handleFormattedTextClick = (e) => Utils.handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);

render() {
const {attachment, options} = this.props;
Expand Down
4 changes: 1 addition & 3 deletions components/post_view/post_message_view/post_message_view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ export default class PostMessageView extends React.PureComponent {
);
}

handleFormattedTextClick(e) {
Utils.handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);
}
handleFormattedTextClick = (e) => Utils.handleFormattedTextClick(e, this.props.currentRelativeTeamUrl);

render() {
const {
Expand Down

0 comments on commit 11872ff

Please sign in to comment.