Skip to content

Commit

Permalink
Change hasChanged behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Oct 25, 2022
1 parent 585667b commit e8558ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const DiscoverTopNav = ({
[dataView, navigateTo, savedSearch, services, stateContainer, updateAdHocDataViewId]
);
const badges = useMemo(() => {
if (hasChanged && savedSearch.id) {
if (hasChanged) {
return [
{
badgeText: i18n.translate('discover.unsavedChangesBadge', {
Expand All @@ -211,7 +211,7 @@ export const DiscoverTopNav = ({
}

return [];
}, [hasChanged, savedSearch.id]);
}, [hasChanged]);

return (
<AggregateQueryTopNavMenu
Expand Down

0 comments on commit e8558ab

Please sign in to comment.