Skip to content

Commit

Permalink
[core] Better warnings for class names duplicates (#11788)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Jun 9, 2018
1 parent a5df649 commit b4aaf20
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/material-ui/src/styles/createGenerateClassName.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b4aaf20

Please sign in to comment.