From fd0038e9e05e31350eff13e015f3250525a64f89 Mon Sep 17 00:00:00 2001 From: dolfje Date: Sun, 22 Mar 2020 10:55:27 +0100 Subject: [PATCH] Reduce unnecesary render with gutter={[7,9]} #22474 (#22475) --- components/grid/row.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/grid/row.tsx b/components/grid/row.tsx index 49f9c412b0..25a789cb8c 100644 --- a/components/grid/row.tsx +++ b/components/grid/row.tsx @@ -46,7 +46,7 @@ export default class Row extends React.Component { this.token = ResponsiveObserve.subscribe(screens => { const { gutter } = this.props; if ( - typeof gutter === 'object' || + (!Array.isArray(gutter) && typeof gutter === 'object') || (Array.isArray(gutter) && (typeof gutter[0] === 'object' || typeof gutter[1] === 'object')) ) { this.setState({ screens });