From: Pascal Mugnier Date: Mon, 28 May 2018 09:00:49 +0000 (+0200) Subject: SONAR-10669 Favorite star not reset after navigating to searched project X-Git-Tag: 7.5~1094 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb17d0d2279c9d125f494525bfa4c4ab3692a0e1;p=sonarqube.git SONAR-10669 Favorite star not reset after navigating to searched project --- diff --git a/server/sonar-web/src/main/js/components/controls/FavoriteBase.tsx b/server/sonar-web/src/main/js/components/controls/FavoriteBase.tsx index 0d4dc401c97..a1bd2cc6866 100644 --- a/server/sonar-web/src/main/js/components/controls/FavoriteBase.tsx +++ b/server/sonar-web/src/main/js/components/controls/FavoriteBase.tsx @@ -48,7 +48,7 @@ export default class FavoriteBase extends React.PureComponent { } componentWillReceiveProps(nextProps: Props) { - if (nextProps.favorite !== this.props.favorite && nextProps.favorite !== this.state.favorite) { + if (nextProps.favorite !== this.props.favorite || nextProps.favorite !== this.state.favorite) { this.setState({ favorite: nextProps.favorite }); } }