From 8a196d598a49e896bbace2c4a0f5e6b70d331ffa Mon Sep 17 00:00:00 2001 From: Sai Hemanth B Date: Mon, 10 Jan 2022 09:30:10 +0000 Subject: [PATCH] Bug 1737968 - Replace lodash difference usage with filter. r=nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D135443 --- .../debugger/src/components/PrimaryPanes/SourcesTree.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js index aa2fa96bd43d..c275d0303826 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js @@ -6,7 +6,6 @@ import React, { Component } from "react"; import classnames from "classnames"; import { connect } from "../../utils/connect"; -import { difference } from "lodash"; // Selectors import { @@ -190,7 +189,9 @@ class SourcesTree extends Component { getSourcesGroups = item => { const sourcesAll = getAllSources(this.props); const sourcesInside = getSourcesInsideGroup(item, this.props); - const sourcesOuside = difference(sourcesAll, sourcesInside); + const sourcesOuside = sourcesAll.filter( + source => !sourcesInside.includes(source) + ); return { sourcesInside, sourcesOuside }; };