Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Don't let FollowTagButton pass reduntant props to IconComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
artkravchenko committed Sep 16, 2016
1 parent ce18ce1 commit 76e8bff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/follow-tag-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
import React, { PropTypes } from 'react';
import ga from 'react-google-analytics';
import { omit } from 'lodash';

import { CurrentUser as CurrentUserPropType } from '../prop-types/users';

Expand Down Expand Up @@ -101,9 +102,7 @@ export default class FollowTagButton extends React.Component {
return null;
}

const buttonProps = { ...props };
delete buttonProps.tag;
delete buttonProps.triggers;
const buttonProps = omit(props, Object.keys(FollowTagButton.propTypes));

// If followTag or unfollowTag was performed
if (status !== STATUS_NOT_TOUCHED) {
Expand Down

0 comments on commit 76e8bff

Please sign in to comment.