Skip to content

Commit

Permalink
add comment about why the data-attribute is reset in <Global/>
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Apr 26, 2021
1 parent c550bc1 commit 9596d32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export let Global: React.AbstractComponent<
sheet.before = cache.sheet.tags[0]
}
if (node !== null) {
// clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
node.setAttribute('data-emotion', key)
sheet.hydrate([node])
} else {
Expand Down

0 comments on commit 9596d32

Please sign in to comment.