diff --git a/packages/styled-components/src/utils/classNameUsageCheckInjector.js b/packages/styled-components/src/utils/classNameUsageCheckInjector.js
index <HASH>..<HASH> 100644
--- a/packages/styled-components/src/utils/classNameUsageCheckInjector.js
+++ b/packages/styled-components/src/utils/classNameUsageCheckInjector.js
@@ -28,7 +28,7 @@ export default (target: Object) => {
     didWarnAboutClassNameUsage.add(forwardTarget);
 
     const classNames = elementClassName
-      .replace(/ +/g, ' ')
+      .replace(/\s+/g, ' ')
       .trim()
       .split(' ');
     // eslint-disable-next-line react/no-find-dom-node
#<I> forgot to replace \n to '' in className (#<I>)