Bug 1737995 - [devtools] Remove lodash zip usage. r=bomsy.

Differential Revision: https://phabricator.services.mozilla.com/D134615
This commit is contained in:
Nicolas Chevobbe 2022-01-03 13:25:47 +00:00
parent 0577bf26d6
commit 652751c863
2 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@ import {
isGeneratedId,
originalToGeneratedId,
} from "devtools-source-map";
import { uniqBy, zip } from "lodash";
import { uniqBy } from "lodash";
import {
getSource,
@ -30,10 +30,10 @@ async function mapLocations(generatedLocations, { sourceMaps }) {
generatedLocations
);
return zip(
originalLocations,
generatedLocations
).map(([location, generatedLocation]) => ({ location, generatedLocation }));
return originalLocations.map((location, index) => ({
location,
generatedLocation: generatedLocations[index],
}));
}
// Filter out positions, that are not in the original source Id

View File

@ -7,7 +7,7 @@
* @module reducers/expressions
*/
import { omit, zip } from "lodash";
import { omit } from "lodash";
import { createSelector } from "reselect";
import { prefs } from "../utils/prefs";
@ -51,11 +51,11 @@ function update(state = initialExpressionState(), action) {
case "EVALUATE_EXPRESSIONS":
const { inputs, results } = action;
return zip(inputs, results).reduce(
(_state, [input, result]) =>
return inputs.reduce(
(_state, input, index) =>
updateExpressionInList(_state, input, {
input,
value: result,
value: results[index],
updating: false,
}),
state