Skip to content

Commit

Permalink
fix: cannot read property 'split' of undefined (#225)
Browse files Browse the repository at this point in the history
* fix: cannot read property 'split' of undefined

* fix: lint error in getClassName

* fix: lint error in getClassName
  • Loading branch information
AlbertLucianto authored and gajus committed Feb 19, 2019
1 parent b3ae56b commit fa15c8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/getClassName.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit fa15c8d

Please sign in to comment.