diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-07-01 12:45:18 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-07-01 19:31:10 +0200 |
commit | c49f7d5d164d59340a3106967b3e9e5deaf99345 (patch) | |
tree | fe2f189f7b7f584f8a46fc8d88cd999ecc461c3e | |
parent | 82a76f03a4e503d76c29570cd97f6e135ef3d7a7 (diff) |
Use strict equality rather than Immutable.is as the compared props are values
-rw-r--r-- | app/javascript/flavours/glitch/components/intersection_observer_article.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/components/intersection_observer_article.js b/app/javascript/flavours/glitch/components/intersection_observer_article.js index c8427f0bf..03b3700df 100644 --- a/app/javascript/flavours/glitch/components/intersection_observer_article.js +++ b/app/javascript/flavours/glitch/components/intersection_observer_article.js @@ -1,9 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import ImmutablePureComponent from 'react-immutable-pure-component'; import scheduleIdleTask from 'flavours/glitch/util/schedule_idle_task'; import getRectFromEntry from 'flavours/glitch/util/get_rect_from_entry'; -import { is } from 'immutable'; // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight']; @@ -34,7 +32,7 @@ export default class IntersectionObserverArticle extends React.Component { } // If we are and remain hidden, diff based on props if (isUnrendered) { - return !updateOnPropsForUnrendered.every(prop => is(nextProps[prop], this.props[prop])); + return !updateOnPropsForUnrendered.every(prop => nextProps[prop] === this.props[prop]); } // Else, assume the children have changed return true; |