mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1737995 - [devtools] Remove lodash zip usage. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D134615
This commit is contained in:
parent
0577bf26d6
commit
652751c863
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user