зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1737980 - [devtools] Remove lodash omit usage. r=bomsy.
It was only used in storeExpressions, where we can replace it by storing only the input property instead of removing the value property from the object we store. Differential Revision: https://phabricator.services.mozilla.com/D136164
This commit is contained in:
Родитель
2cb68401e0
Коммит
c00196fd3f
|
@ -7,8 +7,6 @@
|
|||
* @module reducers/expressions
|
||||
*/
|
||||
|
||||
import { omit } from "lodash";
|
||||
|
||||
import { createSelector } from "reselect";
|
||||
import { prefs } from "../utils/prefs";
|
||||
|
||||
|
@ -100,7 +98,11 @@ function restoreExpressions() {
|
|||
}
|
||||
|
||||
function storeExpressions({ expressions }) {
|
||||
prefs.expressions = expressions.map(expression => omit(expression, "value"));
|
||||
// Return the expressions without the `value` property
|
||||
prefs.expressions = expressions.map(({ input, updating }) => ({
|
||||
input,
|
||||
updating,
|
||||
}));
|
||||
}
|
||||
|
||||
function appendExpressionToList(state, value) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче