Skip to content

Commit

Permalink
Flatten the styles before passing them to StyleSheet.create
Browse files Browse the repository at this point in the history
  • Loading branch information
efoken committed Nov 10, 2020
1 parent 5baa5ad commit 4fdd827
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/primitives-core/src/css.js
Expand Up @@ -105,7 +105,9 @@ export function createCss(StyleSheet: Object) {

const hash = JSON.stringify(styles)
if (!generated[hash]) {
const styleSheet = StyleSheet.create({ generated: styles })
const styleSheet = StyleSheet.create({
generated: StyleSheet.flatten(styles)
})
generated[hash] = styleSheet.generated
}
return generated[hash]
Expand Down

0 comments on commit 4fdd827

Please sign in to comment.