Skip to content

Commit ca55836

Browse files
author
Ido Ben-Harosh
committed
[makeStyles] Fix jss StyleSheet attach() call
1 parent a5a7bdb commit ca55836

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/material-ui-benchmark/src/styles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ suite
128128
const dynamicSheet = jss.createStyleSheet(dynamicStyles, {
129129
link: true,
130130
});
131-
dynamicSheet.update({}).attach();
131+
dynamicSheet.update({});
132+
dynamicSheet.attach();
132133
sheetsRegistry.add(dynamicSheet);
133134
}
134135

packages/material-ui-styles/src/makeStyles/makeStyles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ function attach({ state, theme, stylesOptions, stylesCreator, name }, props) {
109109
...options,
110110
});
111111

112-
dynamicSheet.update(props).attach();
112+
dynamicSheet.update(props);
113+
dynamicSheet.attach();
113114

114115
state.dynamicSheet = dynamicSheet;
115116
state.classes = mergeClasses({

0 commit comments

Comments
 (0)