Skip to content

Commit

Permalink
Protect: Fix blockedRequests destructuring fallback (#39569)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta authored Sep 27, 2024
1 parent 2872881 commit 74c4379
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Fixes blockedRequests destructuring fallback
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ const ConnectedFirewallHeader = () => {
const { hasPlan } = usePlan();
const isSupportedWafFeatureEnabled = wafSupported ? isEnabled : bruteForceProtection;
const currentStatus = isSupportedWafFeatureEnabled ? 'on' : 'off';
const { currentDay: currentDayBlockCount, thirtyDays: thirtyDayBlockCounts } = stats
? stats.blockedRequests
: { currentDayStats: 0, thirtyDaysStats: 0 };
const { currentDay: currentDayBlockCount = 0, thirtyDays: thirtyDaysBlockCounts = 0 } =
stats?.blockedRequests || {};

return (
<FirewallHeader
Expand All @@ -145,7 +144,7 @@ const ConnectedFirewallHeader = () => {
bruteForceProtectionIsEnabled={ bruteForceProtection }
wafSupported={ wafSupported }
currentDayStats={ currentDayBlockCount }
thirtyDaysStats={ thirtyDayBlockCounts }
thirtyDaysStats={ thirtyDaysBlockCounts }
standaloneMode={ standaloneMode }
/>
);
Expand Down

0 comments on commit 74c4379

Please sign in to comment.