Skip to content

Commit 32cdbda

Browse files
committed
Address more feedback
1 parent 12d95b6 commit 32cdbda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/react-reconciler/src/ReactStrictModeWarnings.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,16 @@ if (__DEV__) {
303303
}
304304
const type = fiber.type;
305305

306-
// Update legacy context counts
307-
const warningCount = legacyContextCounts.get(type) || 0;
308-
// Increase warning count by 1
309-
legacyContextCounts.set(type, warningCount + 1);
310-
311306
// Dedup strategy: Warn once per component
312307
if (didWarnAboutLegacyContext.has(type)) {
313308
return;
314309
}
315310

311+
// Update legacy context counts
312+
const warningCount = legacyContextCounts.get(type) || 0;
313+
// Increase warning count by 1
314+
legacyContextCounts.set(type, warningCount + 1);
315+
316316
let warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
317317

318318
if (

0 commit comments

Comments
 (0)