Skip to content

Commit

Permalink
Small fix for #221
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye Hohenberger committed Aug 2, 2017
1 parent f1cedb6 commit b7183f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,7 @@ function deconstruct (style) {
const fragment = style[key]
plain = plain || {}

if (typeof fragment === 'object') {
assign(plain, fragment)
} else if (typeof fragment === 'string') {
if (typeof fragment === 'string') {
const match = emotionClassRegex.exec(fragment)
if (match !== null && registered[match[1]]) {
// replace fragments
Expand All @@ -261,6 +259,9 @@ function deconstruct (style) {
}
assign(plain, reg.style)
}
} else {
// what about arrays?
assign(plain, fragment)
}
} else {
plain = plain || {}
Expand Down

0 comments on commit b7183f1

Please sign in to comment.