Browse Source

[chore] fix off-by-one error in loop

This fixes an alert that was found on LGTM.com
pull/13747/head
Sam Lanning 6 years ago
committed by 偏右
parent
commit
843056e58e
  1. 2
      components/grid/row.tsx

2
components/grid/row.tsx

@ -102,7 +102,7 @@ export default class Row extends React.Component<RowProps, RowState> {
getGutter(): number | undefined {
const { gutter } = this.props;
if (typeof gutter === 'object') {
for (let i = 0; i <= responsiveArray.length; i++) {
for (let i = 0; i < responsiveArray.length; i++) {
const breakpoint: Breakpoint = responsiveArray[i];
if (this.state.screens[breakpoint] && gutter[breakpoint] !== undefined) {
return gutter[breakpoint];

Loading…
Cancel
Save