Skip to content

Commit

Permalink
[makeStyles] Fix jss StyleSheet attach() call
Browse files Browse the repository at this point in the history
  • Loading branch information
Ido Ben-Harosh committed Dec 30, 2019
1 parent a5a7bdb commit ca55836
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/material-ui-benchmark/src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ suite
const dynamicSheet = jss.createStyleSheet(dynamicStyles, {
link: true,
});
dynamicSheet.update({}).attach();
dynamicSheet.update({});
dynamicSheet.attach();
sheetsRegistry.add(dynamicSheet);
}

Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui-styles/src/makeStyles/makeStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ function attach({ state, theme, stylesOptions, stylesCreator, name }, props) {
...options,
});

dynamicSheet.update(props).attach();
dynamicSheet.update(props);
dynamicSheet.attach();

state.dynamicSheet = dynamicSheet;
state.classes = mergeClasses({
Expand Down

0 comments on commit ca55836

Please sign in to comment.