File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,10 @@ const getClassNameFromMultipleImports = (
87
87
export default ( styleNameValue : string , styleModuleImportMap : StyleModuleImportMapType , options ? : GetClassNameOptionsType ) : string => {
88
88
const styleModuleImportMapKeys = Object . keys ( styleModuleImportMap ) ;
89
89
90
- const handleMissingStyleName = options && options . handleMissingStyleName ||
91
- optionsDefaults . handleMissingStyleName ;
92
-
93
- const autoResolveMultipleImports = options && options . autoResolveMultipleImports ;
90
+ const {
91
+ handleMissingStyleName = optionsDefaults . handleMissingStyleName ,
92
+ autoResolveMultipleImports = optionsDefaults . autoResolveMultipleImports
93
+ } = options || { } ;
94
94
95
95
if ( ! styleNameValue ) {
96
96
return '' ;
Original file line number Diff line number Diff line change @@ -211,8 +211,10 @@ export default ({
211
211
return ;
212
212
}
213
213
214
- const handleMissingStyleName = stats . opts && stats . opts . handleMissingStyleName || optionsDefaults . handleMissingStyleName ;
215
- const autoResolveMultipleImports = stats . opts && stats . opts . autoResolveMultipleImports || optionsDefaults . autoResolveMultipleImports ;
214
+ const {
215
+ handleMissingStyleName = optionsDefaults . handleMissingStyleName ,
216
+ autoResolveMultipleImports = optionsDefaults . autoResolveMultipleImports
217
+ } = stats . opts || { } ;
216
218
217
219
for ( const attribute of attributes ) {
218
220
const destinationName = attributeNames [ attribute . name . name ] ;
You can’t perform that action at this time.
0 commit comments