From eb17d0d2279c9d125f494525bfa4c4ab3692a0e1 Mon Sep 17 00:00:00 2001 From: Pascal Mugnier Date: Mon, 28 May 2018 11:00:49 +0200 Subject: [PATCH] SONAR-10669 Favorite star not reset after navigating to searched project --- .../sonar-web/src/main/js/components/controls/FavoriteBase.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }); } } -- 2.39.5