From efcc196a8e821ab5f85a9b964e869af8b171be4e Mon Sep 17 00:00:00 2001 From: Oopscurity Date: Sat, 17 Sep 2016 00:34:07 +0300 Subject: [PATCH] Don't let FollowTagButton pass reduntant props to IconComponent --- src/components/follow-tag-button.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/follow-tag-button.js b/src/components/follow-tag-button.js index cea4c334..7d54dcb9 100644 --- a/src/components/follow-tag-button.js +++ b/src/components/follow-tag-button.js @@ -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'; @@ -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) {