Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[styles] Fix jss StyleSheet attach() call #19042

Merged
merged 1 commit into from
Dec 30, 2019

Conversation

mceIdo
Copy link
Contributor

@mceIdo mceIdo commented Dec 30, 2019

Fix #19005

In the latest jss (10.0.1), a breaking change was introduced, making the StyleSheet.update() to return undefined instead of this - https://github.com/cssinjs/jss/pull/1242/files#diff-29aac1ba5d08e188c14800bc889c5474L186.
If was described here as well - cssinjs/jss#1249 (comment)

I Simply separated the calls

@mui-pr-bot
Copy link

Details of bundle changes.

Comparing: a5a7bdb...ca55836

bundle Size Change Size Gzip Change Gzip
Card ▲ +2 B (0.00% ) 62.5 kB ▲ +4 B (+0.02% ) 19.6 kB
Radio ▲ +2 B (0.00% ) 82.7 kB ▲ +3 B (+0.01% ) 26.2 kB
Switch ▲ +2 B (0.00% ) 80.8 kB ▲ +3 B (+0.01% ) 25.5 kB
@material-ui/core ▲ +2 B (0.00% ) 358 kB ▲ +2 B (0.00% ) 97.7 kB
@material-ui/core[umd] ▲ +2 B (0.00% ) 314 kB ▲ +2 B (0.00% ) 90.6 kB
@material-ui/lab ▲ +2 B (0.00% ) 176 kB ▲ +2 B (0.00% ) 53.1 kB
@material-ui/styles ▲ +2 B (0.00% ) 50.8 kB ▲ +2 B (+0.01% ) 15.3 kB
AppBar ▲ +2 B (0.00% ) 63.6 kB ▲ +2 B (+0.01% ) 20 kB
Backdrop ▲ +2 B (0.00% ) 67.4 kB ▲ +2 B (+0.01% ) 20.9 kB
BottomNavigation ▲ +2 B (0.00% ) 62.1 kB ▲ +2 B (+0.01% ) 19.5 kB
BottomNavigationAction ▲ +2 B (0.00% ) 75.2 kB ▲ +2 B (+0.01% ) 23.8 kB
ButtonBase ▲ +2 B (0.00% ) 73.6 kB ▲ +2 B (+0.01% ) 23.2 kB
CardActionArea ▲ +2 B (0.00% ) 74.7 kB ▲ +2 B (+0.01% ) 23.6 kB
CardActions ▲ +2 B (0.00% ) 61.7 kB ▲ +2 B (+0.01% ) 19.4 kB
CardHeader ▲ +2 B (0.00% ) 64.8 kB ▲ +2 B (+0.01% ) 20.5 kB
Checkbox ▲ +2 B (0.00% ) 81.6 kB ▲ +2 B (+0.01% ) 25.9 kB
Collapse ▲ +2 B (0.00% ) 67.6 kB ▲ +2 B (+0.01% ) 21 kB
CssBaseline ▲ +2 B (0.00% ) 57.3 kB ▲ +2 B (+0.01% ) 18 kB
DialogContent ▲ +2 B (0.00% ) 61.9 kB ▲ +2 B (+0.01% ) 19.5 kB
ExpansionPanel ▲ +2 B (0.00% ) 71.1 kB ▲ +2 B (+0.01% ) 22.3 kB
ExpansionPanelDetails ▲ +2 B (0.00% ) 61.6 kB ▲ +2 B (+0.01% ) 19.4 kB
FilledInput ▲ +2 B (0.00% ) 73.2 kB ▲ +2 B (+0.01% ) 22.8 kB
FormControl ▲ +2 B (0.00% ) 64.1 kB ▲ +2 B (+0.01% ) 20 kB
FormGroup ▲ +2 B (0.00% ) 61.7 kB ▲ +2 B (+0.01% ) 19.4 kB
GridListTile ▲ +2 B (0.00% ) 63.4 kB ▲ +2 B (+0.01% ) 19.9 kB
GridListTileBar ▲ +2 B (0.00% ) 62.9 kB ▲ +2 B (+0.01% ) 19.8 kB
Icon ▲ +2 B (0.00% ) 62.5 kB ▲ +2 B (+0.01% ) 19.6 kB
IconButton ▲ +2 B (0.00% ) 75.8 kB ▲ +2 B (+0.01% ) 23.7 kB
Input ▲ +2 B (0.00% ) 72.2 kB ▲ +2 B (+0.01% ) 22.6 kB
InputLabel ▲ +2 B (0.00% ) 65 kB ▲ +2 B (+0.01% ) 20.1 kB
LinearProgress ▲ +2 B (0.00% ) 65 kB ▲ +2 B (+0.01% ) 20.4 kB
Link ▲ +2 B (0.00% ) 66.3 kB ▲ +2 B (+0.01% ) 21 kB
List ▲ +2 B (0.00% ) 62.1 kB ▲ +2 B (+0.01% ) 19.4 kB
ListItemText ▲ +2 B (0.00% ) 64.7 kB ▲ +2 B (+0.01% ) 20.4 kB
Menu ▲ +2 B (0.00% ) 88.1 kB ▲ +2 B (+0.01% ) 27.2 kB
MenuItem ▲ +2 B (0.00% ) 77.8 kB ▲ +2 B (+0.01% ) 24.4 kB
MenuList ▲ +2 B (0.00% ) 65.7 kB ▲ +2 B (+0.01% ) 20.6 kB
NativeSelect ▲ +2 B (0.00% ) 76.5 kB ▲ +2 B (+0.01% ) 24.2 kB
OutlinedInput ▲ +2 B (0.00% ) 73.7 kB ▲ +2 B (+0.01% ) 23 kB
Paper ▲ +2 B (0.00% ) 62 kB ▲ +2 B (+0.01% ) 19.4 kB
RadioGroup ▲ +2 B (0.00% ) 63.1 kB ▲ +2 B (+0.01% ) 19.8 kB
Skeleton ▲ +2 B (0.00% ) 62.3 kB ▲ +2 B (+0.01% ) 19.7 kB
Slider ▲ +2 B (0.00% ) 75.3 kB ▲ +2 B (+0.01% ) 23.9 kB
SpeedDial ▲ +2 B (0.00% ) 85.7 kB ▲ +2 B (+0.01% ) 27.1 kB
Step ▲ +2 B (0.00% ) 62.3 kB ▲ +2 B (+0.01% ) 19.6 kB
StepContent ▲ +2 B (0.00% ) 68.7 kB ▲ +2 B (+0.01% ) 21.6 kB
StepLabel ▲ +2 B (0.00% ) 68.3 kB ▲ +2 B (+0.01% ) 21.2 kB
SwipeableDrawer ▲ +2 B (0.00% ) 91.6 kB ▲ +2 B (+0.01% ) 28.7 kB
Table ▲ +2 B (0.00% ) 62.2 kB ▲ +2 B (+0.01% ) 19.6 kB
TableContainer ▲ +2 B (0.00% ) 61.7 kB ▲ +2 B (+0.01% ) 19.4 kB
TableHead ▲ +2 B (0.00% ) 61.8 kB ▲ +2 B (+0.01% ) 19.4 kB
Tabs ▲ +2 B (0.00% ) 85.1 kB ▲ +2 B (+0.01% ) 27.1 kB
ToggleButton ▲ +2 B (0.00% ) 75.8 kB ▲ +2 B (+0.01% ) 24.1 kB
ToggleButtonGroup ▲ +2 B (0.00% ) 62.9 kB ▲ +2 B (+0.01% ) 19.8 kB
TreeItem ▲ +2 B (0.00% ) 73.4 kB ▲ +2 B (+0.01% ) 23.3 kB
TreeView ▲ +2 B (0.00% ) 66.1 kB ▲ +2 B (+0.01% ) 20.8 kB
Autocomplete ▲ +2 B (0.00% ) 129 kB ▲ +1 B (0.00% ) 40.4 kB
Avatar ▲ +2 B (0.00% ) 64.9 kB ▲ +1 B (0.00% ) 20.5 kB
AvatarGroup ▲ +2 B (0.00% ) 62 kB ▲ +1 B (+0.01% ) 19.5 kB
Badge ▲ +2 B (0.00% ) 65 kB ▲ +1 B (0.00% ) 20.3 kB
Box ▲ +2 B (0.00% ) 70.4 kB ▲ +1 B (0.00% ) 21.5 kB
Breadcrumbs ▲ +2 B (0.00% ) 67.7 kB ▲ +1 B (0.00% ) 21.3 kB
Button ▲ +2 B (0.00% ) 79.4 kB ▲ +1 B (0.00% ) 24.4 kB
CardContent ▲ +2 B (0.00% ) 61.7 kB ▲ +1 B (+0.01% ) 19.4 kB
CardMedia ▲ +2 B (0.00% ) 62 kB ▲ +1 B (+0.01% ) 19.6 kB
Chip ▲ +2 B (0.00% ) 82.2 kB ▲ +1 B (0.00% ) 25.2 kB
CircularProgress ▲ +2 B (0.00% ) 63.8 kB ▲ +1 B (0.00% ) 20.2 kB
Container ▲ +2 B (0.00% ) 62.9 kB ▲ +1 B (+0.01% ) 19.7 kB
Dialog ▲ +2 B (0.00% ) 82.4 kB ▲ +1 B (0.00% ) 25.8 kB
DialogActions ▲ +2 B (0.00% ) 61.8 kB ▲ +1 B (+0.01% ) 19.4 kB
DialogContentText ▲ +2 B (0.00% ) 63.7 kB ▲ +1 B (0.00% ) 20.1 kB
DialogTitle ▲ +2 B (0.00% ) 64 kB ▲ +1 B (0.00% ) 20.1 kB
Divider ▲ +2 B (0.00% ) 62.3 kB ▲ +1 B (+0.01% ) 19.6 kB
docs.main ▲ +2 B (0.00% ) 613 kB ▲ +1 B (0.00% ) 196 kB
Drawer ▲ +2 B (0.00% ) 84.2 kB ▲ +1 B (0.00% ) 25.7 kB
ExpansionPanelActions ▲ +2 B (0.00% ) 61.8 kB ▲ +1 B (+0.01% ) 19.4 kB
ExpansionPanelSummary ▲ +2 B (0.00% ) 77.8 kB ▲ +1 B (0.00% ) 24.6 kB
Fab ▲ +2 B (0.00% ) 76.5 kB ▲ +1 B (0.00% ) 23.9 kB
FormControlLabel ▲ +2 B (0.00% ) 65.2 kB ▲ +1 B (0.00% ) 20.5 kB
FormHelperText ▲ +2 B (0.00% ) 63 kB ▲ +1 B (+0.01% ) 19.8 kB
FormLabel ▲ +2 B (0.00% ) 63.2 kB ▲ +1 B (+0.01% ) 19.6 kB
Grid ▲ +2 B (0.00% ) 64.8 kB ▲ +1 B (0.00% ) 20.4 kB
GridList ▲ +2 B (0.00% ) 62.2 kB ▲ +1 B (+0.01% ) 19.6 kB
Hidden ▲ +2 B (0.00% ) 65.6 kB ▲ +1 B (0.00% ) 20.7 kB
InputAdornment ▲ +2 B (0.00% ) 64.8 kB ▲ +1 B (0.00% ) 20.4 kB
InputBase ▲ +2 B (0.00% ) 70.3 kB ▲ +1 B (0.00% ) 22.1 kB
ListItem ▲ +2 B (0.00% ) 76.8 kB ▲ +1 B (0.00% ) 24.1 kB
ListItemAvatar ▲ +2 B (0.00% ) 61.8 kB ▲ +1 B (+0.01% ) 19.4 kB
ListItemIcon ▲ +2 B (0.00% ) 61.9 kB ▲ +1 B (+0.01% ) 19.4 kB
ListItemSecondaryAction ▲ +2 B (0.00% ) 61.7 kB ▲ +1 B (+0.01% ) 19.4 kB
ListSubheader ▲ +2 B (0.00% ) 62.4 kB ▲ +1 B (+0.01% ) 19.7 kB
MobileStepper ▲ +2 B (0.00% ) 67.5 kB ▲ +1 B (0.00% ) 21.2 kB
Popover ▲ +2 B (0.00% ) 82.5 kB ▲ +1 B (0.00% ) 25.6 kB
Rating ▲ +2 B (0.00% ) 69.7 kB ▲ +1 B (0.00% ) 22.5 kB
Select ▲ +2 B (0.00% ) 114 kB ▲ +1 B (0.00% ) 34 kB
Snackbar ▲ +2 B (0.00% ) 74.8 kB ▲ +1 B (0.00% ) 23.4 kB
SnackbarContent ▲ +2 B (0.00% ) 63.2 kB ▲ +1 B (+0.01% ) 20 kB
SpeedDialAction ▲ +2 B (0.00% ) 117 kB ▲ +1 B (0.00% ) 37 kB
SpeedDialIcon ▲ +2 B (0.00% ) 64.3 kB ▲ +1 B (0.00% ) 20.2 kB
StepButton ▲ +2 B (0.00% ) 82 kB ▲ +1 B (0.00% ) 26 kB
StepConnector ▲ +2 B (0.00% ) 62.4 kB ▲ +1 B (+0.01% ) 19.7 kB
StepIcon ▲ +2 B (0.00% ) 64.3 kB ▲ +1 B (0.00% ) 20.1 kB
Stepper ▲ +2 B (0.00% ) 64.6 kB ▲ +1 B (0.00% ) 20.4 kB
SvgIcon ▲ +2 B (0.00% ) 62.7 kB ▲ +1 B (+0.01% ) 19.6 kB
Tab ▲ +2 B (0.00% ) 76 kB ▲ +1 B (0.00% ) 24.1 kB
TableBody ▲ +2 B (0.00% ) 61.8 kB ▲ +1 B (+0.01% ) 19.4 kB
TableCell ▲ +2 B (0.00% ) 63.7 kB ▲ +1 B (0.00% ) 20.1 kB
TableFooter ▲ +2 B (0.00% ) 61.8 kB ▲ +1 B (+0.01% ) 19.4 kB
TablePagination ▲ +2 B (0.00% ) 141 kB ▲ +1 B (0.00% ) 41.3 kB
TableRow ▲ +2 B (0.00% ) 62.2 kB ▲ +1 B (+0.01% ) 19.6 kB
TableSortLabel ▲ +2 B (0.00% ) 77 kB ▲ +1 B (0.00% ) 24.3 kB
TextField ▲ +2 B (0.00% ) 123 kB ▲ +1 B (0.00% ) 36.1 kB
Toolbar ▲ +2 B (0.00% ) 62 kB ▲ +1 B (+0.01% ) 19.6 kB
Tooltip ▲ +2 B (0.00% ) 101 kB ▲ +1 B (0.00% ) 31.9 kB
Typography ▲ +2 B (0.00% ) 63.3 kB ▲ +1 B (+0.01% ) 19.9 kB
ButtonGroup ▲ +2 B (0.00% ) 82.8 kB -- 25.5 kB
@material-ui/system -- 14.5 kB -- 4.04 kB
ClickAwayListener -- 3.85 kB -- 1.55 kB
colorManipulator -- 3.85 kB -- 1.52 kB
docs.landing -- 50.7 kB -- 13.4 kB
Fade -- 23.2 kB -- 7.98 kB
Grow -- 23.8 kB -- 8.19 kB
Modal -- 14.3 kB -- 5.01 kB
NoSsr -- 2.19 kB -- 1.04 kB
Popper -- 28.7 kB -- 10.3 kB
Portal -- 2.9 kB -- 1.3 kB
RootRef -- 4.21 kB -- 1.64 kB
Slide -- 25.3 kB -- 8.71 kB
styles/createMuiTheme -- 16.4 kB -- 5.83 kB
TextareaAutosize -- 5.09 kB -- 2.14 kB
useAutocomplete -- 12.6 kB -- 4.7 kB
useMediaQuery -- 2.5 kB -- 1.06 kB
Zoom -- 23.3 kB -- 8.1 kB

Generated by 🚫 dangerJS against ca55836

@oliviertassinari oliviertassinari changed the title [makeStyles] Fix jss StyleSheet attach() call [styles] Fix jss StyleSheet attach() call Dec 30, 2019
@mwskwong
Copy link
Contributor

The alternative is

dynamicSheet.attach().update(props);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read property 'attach' of undefined at attach
6 participants