Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/modules/components/Ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function Ad(props) {
if (
document.querySelector('#carbonads a') &&
document.querySelector('#carbonads a').getAttribute('href') ===
'https://material-ui-next.com/discover-more/backers'
'https://material-ui-next.com/discover-more/backers'
) {
setCarbonOut(true);
}
Expand Down Expand Up @@ -157,13 +157,13 @@ function Ad(props) {
if (Math.random() >= 0.8) {
children = getAdblock(classes, t);
} else {
children = <AdInHouse ad={inHouseAds[Math.round((inHouseAds.length - 1) * random)]} />;
children = <AdInHouse ad={inHouseAds[Math.floor(inHouseAds.length * random)]} />;
}
}

if (!children) {
if (carbonOut || codeFundOut) {
children = <AdInHouse ad={inHouseAds[Math.round((inHouseAds.length - 1) * random)]} />;
children = <AdInHouse ad={inHouseAds[Math.floor(inHouseAds.length * random)]} />;
minHeight = 'auto';
} else if (random >= 0.55) {
children = <AdCodeFund />;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/HomeQuickWord.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const styles = theme => ({
function HomeQuickWord(props) {
const { classes } = props;
const t = useSelector(state => state.options.t);
const backer = backers[Math.round((backers.length - 1) * Math.random())];
const backer = backers[Math.floor(backers.length * Math.random())];

return (
<div className={classes.root}>
Expand Down