From 8496c01b034e53c8f644fcd4cac3b1b16cd98647 Mon Sep 17 00:00:00 2001 From: AlbertLucianto Date: Tue, 19 Feb 2019 05:09:03 +0800 Subject: [PATCH 1/3] fix: cannot read property 'split' of undefined --- src/getClassName.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/getClassName.js b/src/getClassName.js index d99d858..7420a09 100644 --- a/src/getClassName.js +++ b/src/getClassName.js @@ -72,6 +72,8 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM const handleMissingStyleName = options && options.handleMissingStyleName || DEFAULT_HANDLE_MISSING_STYLENAME_OPTION; + if (!styleNameValue) return ''; + return styleNameValue .split(' ') .filter((styleName) => { From 9b8ed7d646b9c4aaf4a4512b70421f766e4e2799 Mon Sep 17 00:00:00 2001 From: AlbertLucianto Date: Tue, 19 Feb 2019 13:09:38 +0800 Subject: [PATCH 2/3] fix: lint error in getClassName --- src/getClassName.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/getClassName.js b/src/getClassName.js index 7420a09..f1cfd00 100644 --- a/src/getClassName.js +++ b/src/getClassName.js @@ -72,7 +72,9 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM const handleMissingStyleName = options && options.handleMissingStyleName || DEFAULT_HANDLE_MISSING_STYLENAME_OPTION; - if (!styleNameValue) return ''; + if (!styleNameValue) { + return ''; + }; return styleNameValue .split(' ') From b6155cabb50d13bad0241c82d2f818c2c7b91a9d Mon Sep 17 00:00:00 2001 From: AlbertLucianto Date: Tue, 19 Feb 2019 13:23:00 +0800 Subject: [PATCH 3/3] fix: lint error in getClassName --- src/getClassName.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getClassName.js b/src/getClassName.js index f1cfd00..87e29cd 100644 --- a/src/getClassName.js +++ b/src/getClassName.js @@ -74,7 +74,7 @@ export default (styleNameValue: string, styleModuleImportMap: StyleModuleImportM if (!styleNameValue) { return ''; - }; + } return styleNameValue .split(' ')