diff --git a/src/getClassName.js b/src/getClassName.js index d99d858..87e29cd 100644 --- a/src/getClassName.js +++ b/src/getClassName.js @@ -72,6 +72,10 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM const handleMissingStyleName = options && options.handleMissingStyleName || DEFAULT_HANDLE_MISSING_STYLENAME_OPTION; + if (!styleNameValue) { + return ''; + } + return styleNameValue .split(' ') .filter((styleName) => {