Skip to content

Commit

Permalink
perf: only create deprecation message if we will use it
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Feb 18, 2025
1 parent c4d5dca commit 70c57f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/app/lib/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,9 @@ export function deprecationConsoleWarning(nameSpace, methodName, instanceName, i
const instanceMap = moduleMap[instanceName];
const deprecatedMethod = instanceMap[methodName];
if (instanceMap && deprecatedMethod) {
const message = createMessage(nameSpace, methodName, instanceName);

if (!globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS) {
// eslint-disable-next-line no-console
console.warn(message);
console.warn(createMessage(nameSpace, methodName, instanceName));
}
}
}
Expand Down

0 comments on commit 70c57f4

Please sign in to comment.