Skip to content

Commit e994113

Browse files
authored
Merge branch 'master' into feature/injectStyled
2 parents b555ba6 + 1819075 commit e994113

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "styled-jss",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"description": "Styled Components on top of JSS.",
55
"main": "lib/index.js",
66
"scripts": {

src/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,19 @@ const createStyled = (jss?: Function = jssDefault) => (baseStyles: Object = {}):
6666
}
6767

6868
if (dynamicStyles && !sheets.dynamicSheet.getRule(this.tagScoped)) {
69-
sheets.dynamicSheet.addRule(this.tagScoped, dynamicStyles)
69+
sheets.dynamicSheet
70+
.detach()
71+
.addRule(this.tagScoped, dynamicStyles)
7072
sheets.dynamicSheet
7173
.update(this.tagScoped, this.props)
72-
.deploy()
74+
.attach()
75+
.link()
7376
}
7477
}
7578

7679
componentWillReceiveProps(nextProps: StyledElementPropsType) {
7780
if (dynamicStyles) {
78-
sheets.dynamicSheet
79-
.update(this.tagScoped, nextProps)
80-
.deploy()
81+
sheets.dynamicSheet.update(this.tagScoped, nextProps)
8182
}
8283
}
8384

0 commit comments

Comments
 (0)