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 = {}) {
207207 break
208208 }
209209
210+ case 'undefined' : //fallthrough - handles accidentally unset values which may come from props
210211 case 'function' : {
211212 //this handles issue when isomorphic-style-loader addes helper functions to css-module
212213 break //just skip
Original file line number Diff line number Diff line change @@ -607,4 +607,16 @@ describe('themeable function', () => {
607607 const result = themeable ( a , b , c )
608608 expect ( result ) . toEqual ( expected )
609609 } )
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+ } )
610622} )
You can’t perform that action at this time.
0 commit comments