Only include missing native module once in the TurboModuleRegistry debug reporting (#39207)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39207

## Changelog:
[Internal] -

Fixes a minor annoyance, whereas if a native module implementation is missing, then it may spam the "NotFound" list with many entries.

Reviewed By: javache

Differential Revision: D48819392

fbshipit-source-id: 6962375ada5f1889be61c9879c8fc07dd2286c3d
This commit is contained in:
Ruslan Shestopalyuk
2023-08-30 04:44:23 -07:00
committed by Facebook GitHub Bot
parent b5ac6189ce
commit 40dca3f0db
@@ -59,7 +59,7 @@ function requireModule<T: TurboModule>(name: string): ?T {
}
}
if (shouldReportDebugInfo()) {
if (shouldReportDebugInfo() && !moduleLoadHistory.NotFound.includes(name)) {
moduleLoadHistory.NotFound.push(name);
}
return null;