Skip to content

Commit fa15c8d

Browse files
AlbertLuciantogajus
authored andcommitted
fix: cannot read property 'split' of undefined (#225)
* fix: cannot read property 'split' of undefined * fix: lint error in getClassName * fix: lint error in getClassName
1 parent b3ae56b commit fa15c8d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/getClassName.js

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM
7272
const handleMissingStyleName = options && options.handleMissingStyleName ||
7373
DEFAULT_HANDLE_MISSING_STYLENAME_OPTION;
7474

75+
if (!styleNameValue) {
76+
return '';
77+
}
78+
7579
return styleNameValue
7680
.split(' ')
7781
.filter((styleName) => {

0 commit comments

Comments
 (0)