Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
refactor(lodash): remove difference (#2455)
Browse files Browse the repository at this point in the history
Both are arrays & always defined, so it's really enough to find all props in this._props (prevProps), but not in `props`
  • Loading branch information
Haroenv committed Jun 27, 2019
1 parent d55337e commit b818bad
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { omit, difference } from 'lodash';
import { omit } from 'lodash';
import createConnector from '../core/createConnector';
import {
refineValue,
Expand All @@ -22,8 +22,9 @@ export default createConnector({
transitionState(props, prevSearchState, nextSearchState) {
const id = getId();
const { children, contextValue, indexContextValue, ...items } = props;
const propKeys = Object.keys(props);
const nonPresentKeys = this._props
? difference(Object.keys(this._props), Object.keys(props))
? Object.keys(this._props).filter(prop => propKeys.indexOf(prop) === -1)
: [];
this._props = props;
const nextValue = {
Expand Down

0 comments on commit b818bad

Please sign in to comment.