Explorar o código

Use correct variable for previous rule counts (#19218)

GitOrigin-RevId: 5245c49ca5ea5dd6599d9a05c5e61b2bd7caa544
Alf Eaton %!s(int64=2) %!d(string=hai) anos
pai
achega
8abda70bfd

+ 1 - 1
services/web/frontend/js/features/pdf-preview/util/output-files.js

@@ -199,7 +199,7 @@ export const buildRuleDeltas = (ruleCounts, previousRuleCounts) => {
 
 
   // keys that are no longer defined in the current log entries
   // keys that are no longer defined in the current log entries
   for (const [key, value] of Object.entries(previousRuleCounts)) {
   for (const [key, value] of Object.entries(previousRuleCounts)) {
-    if (!(key in counts)) {
+    if (!(key in ruleCounts)) {
       counts[key] = 0
       counts[key] = 0
       counts[`delta_${key}`] = -value
       counts[`delta_${key}`] = -value
     }
     }