Bug 1737968 - Replace lodash difference usage with filter. r=nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D135443
This commit is contained in:
Sai Hemanth B 2022-01-10 09:30:10 +00:00
Родитель 2cb85f3675
Коммит 8a196d598a
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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 };
};