diff --git a/packages/shared/consoleWithStackDev.js b/packages/shared/consoleWithStackDev.js index 462788e490..f709ca1e1f 100644 --- a/packages/shared/consoleWithStackDev.js +++ b/packages/shared/consoleWithStackDev.js @@ -8,11 +8,8 @@ import ReactSharedInternals from 'shared/ReactSharedInternals'; import {enableOwnerStacks} from 'shared/ReactFeatureFlags'; -let suppressWarning = false; export function setSuppressWarning(newSuppressWarning) { - if (__DEV__) { - suppressWarning = newSuppressWarning; - } + // TODO: Noop. Delete. } // In DEV, calls to console.warn and console.error get replaced @@ -22,19 +19,11 @@ export function setSuppressWarning(newSuppressWarning) { // they are left as they are instead. export function warn(format, ...args) { - if (__DEV__) { - if (!suppressWarning) { - printWarning('warn', format, args, new Error('react-stack-top-frame')); - } - } + printWarning('warn', format, args, new Error('react-stack-top-frame')); } export function error(format, ...args) { - if (__DEV__) { - if (!suppressWarning) { - printWarning('error', format, args, new Error('react-stack-top-frame')); - } - } + printWarning('error', format, args, new Error('react-stack-top-frame')); } // eslint-disable-next-line react-internal/no-production-logging