@@ -66,7 +66,7 @@ export default (componentName, localTheme, options = {}) => (ThemedComponent) =>
6666
6767 getTheme ( ) {
6868 return this . props . composeTheme === COMPOSE_SOFTLY
69- ? Object . assign ( { } , this . getContextTheme ( ) , localTheme , this . getNamespacedTheme ( ) )
69+ ? { ... this . getContextTheme ( ) , ... localTheme , ... this . getNamespacedTheme ( ) }
7070 : themeable ( themeable ( this . getContextTheme ( ) , localTheme ) , this . getNamespacedTheme ( ) )
7171 }
7272
@@ -98,9 +98,8 @@ export default (componentName, localTheme, options = {}) => (ThemedComponent) =>
9898
9999export function themeable ( style = { } , theme ) {
100100 if ( ! theme ) return style
101- return Object . keys ( theme ) . reduce ( ( result , key ) => (
102- Object . assign ( result , { [ key ] : `${ style [ key ] } ${ theme [ key ] } ` } )
103- ) , Object . assign ( { } , style ) )
101+ return Object . keys ( theme ) . reduce ( ( result , key ) =>
102+ ( { ...result , [ key ] : `${ style [ key ] } ${ theme [ key ] } ` } ) , style )
104103}
105104
106105function validateComposeOption ( composeTheme ) {
@@ -114,6 +113,6 @@ function validateComposeOption(composeTheme) {
114113}
115114
116115function removeNamespace ( key , themeNamespace ) {
117- const capitilized = key . substr ( themeNamespace . length )
118- return capitilized . slice ( 0 , 1 ) . toLowerCase ( ) + capitilized . slice ( 1 )
116+ const capitalized = key . substr ( themeNamespace . length )
117+ return capitalized . slice ( 0 , 1 ) . toLowerCase ( ) + capitalized . slice ( 1 )
119118}
0 commit comments