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

Commit

Permalink
Replace fast-deep-equal with isEqual from lodash (MetaMask#7935)
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh authored and yqrashawn committed Feb 3, 2020
1 parent 9076181 commit 724dc7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"ethjs-rpc": "0.1.9",
"extension-port-stream": "^1.0.0",
"extensionizer": "^1.0.1",
"fast-deep-equal": "^2.0.1",
"fast-json-patch": "^2.0.4",
"fuse.js": "^3.2.0",
"gaba": "^1.9.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import deepEqual from 'fast-deep-equal'
import { isEqual } from 'lodash'
import { PermissionPageContainerContent } from '.'
import { PageContainerFooter } from '../../ui/page-container'

Expand Down Expand Up @@ -39,9 +39,7 @@ export default class PermissionPageContainer extends Component {
componentDidUpdate () {
const newMethodNames = this.getRequestedMethodNames(this.props)

if (
!deepEqual(Object.keys(this.state.selectedPermissions), newMethodNames)
) {
if (!isEqual(Object.keys(this.state.selectedPermissions), newMethodNames)) {
// this should be a new request, so just overwrite
this.setState({
selectedPermissions: this.getRequestedMethodState(newMethodNames),
Expand Down

0 comments on commit 724dc7e

Please sign in to comment.