Skip to content

Commit

Permalink
[styles] Fix jss StyleSheet attach() call (#19042)
Browse files Browse the repository at this point in the history
  • Loading branch information
mceIdo authored and oliviertassinari committed Dec 30, 2019
1 parent c76876c commit dcaf13f
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 dcaf13f

Please sign in to comment.