File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ function merge(original = {}, mixin = {}) {
207
207
break
208
208
}
209
209
210
+ case 'undefined' : //fallthrough - handles accidentally unset values which may come from props
210
211
case 'function' : {
211
212
//this handles issue when isomorphic-style-loader addes helper functions to css-module
212
213
break //just skip
Original file line number Diff line number Diff line change @@ -607,4 +607,16 @@ describe('themeable function', () => {
607
607
const result = themeable ( a , b , c )
608
608
expect ( result ) . toEqual ( expected )
609
609
} )
610
+
611
+ it ( 'should skip undefined mixin values' , ( ) => {
612
+ const a = {
613
+ test : 'a'
614
+ }
615
+ const b = {
616
+ test : undefined
617
+ }
618
+ const expected = a
619
+ const result = themeable ( a , b )
620
+ expect ( result ) . toEqual ( expected )
621
+ } )
610
622
} )
You can’t perform that action at this time.
0 commit comments