Skip to content

Commit

Permalink
Revert "Use deep equality check for plugin props (#254)"
Browse files Browse the repository at this point in the history
This reverts commit 93f71ab.
  • Loading branch information
jenniferarnesen committed Apr 29, 2019
1 parent 08de917 commit 8b5d353
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/plugin/src/ChartPlugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import isEqual from 'lodash-es/isEqual';

import { createChart } from 'd2-charts-api';

import { apiFetchVisualization } from './api/visualization';
Expand Down Expand Up @@ -32,12 +32,12 @@ class ChartPlugin extends Component {
}

componentDidUpdate(prevProps) {
if (!isEqual(this.props.config, prevProps.config)) {
if (this.props.config !== prevProps.config) {
this.renderChart();
return;
}

if (!isEqual(this.props.filters, prevProps.filters)) {
if (this.props.filters !== prevProps.filters) {
this.renderChart();
return;
}
Expand Down

0 comments on commit 8b5d353

Please sign in to comment.