From b4aaf20d5226d0d4c4d9b952941b97c7dfe1ebd6 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 9 Jun 2018 19:31:12 +0200 Subject: [PATCH] [core] Better warnings for class names duplicates (#11788) --- .../material-ui/src/styles/createGenerateClassName.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/material-ui/src/styles/createGenerateClassName.js b/packages/material-ui/src/styles/createGenerateClassName.js index 2077862eeb6d7a..e7b6c5330d81c1 100644 --- a/packages/material-ui/src/styles/createGenerateClassName.js +++ b/packages/material-ui/src/styles/createGenerateClassName.js @@ -21,13 +21,7 @@ export default function createGenerateClassName(options = {}) { // so the warning is only triggered in production. // - We expect a class name generator to be instantiated per new request on the server, // so the warning is only triggered client side. - // - You can get away with having multiple class name generators - // by modifying the `productionPrefix`. - if ( - process.env.NODE_ENV === 'production' && - typeof window !== 'undefined' && - productionPrefix === 'jss' - ) { + if (process.env.NODE_ENV === 'production' && typeof window !== 'undefined') { global.__MUI_GENERATOR_COUNTER__ += 1; if (global.__MUI_GENERATOR_COUNTER__ > 2) {