diff --git a/adminSiteClient/GrapherConfigGridEditor.tsx b/adminSiteClient/GrapherConfigGridEditor.tsx index b26aa5edfde..d66fc72ddd1 100644 --- a/adminSiteClient/GrapherConfigGridEditor.tsx +++ b/adminSiteClient/GrapherConfigGridEditor.tsx @@ -31,7 +31,6 @@ import { match, P } from "ts-pattern" //import * as lodash from "lodash" import { cloneDeep, - findLastIndex, isArray, isEmpty, isEqual, @@ -1447,8 +1446,7 @@ export class GrapherConfigGridEditor extends React.Component item.key === itemKey ) if (itemIndex !== -1) { - const lastVisibleIndex = findLastIndex( - columnSelection, + const lastVisibleIndex = columnSelection.findLastIndex( (item) => item.visible ) diff --git a/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts b/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts index 6750d54904c..8cebafc57cd 100644 --- a/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts +++ b/packages/@ourworldindata/grapher/src/stackedCharts/StackedUtils.ts @@ -8,7 +8,6 @@ import { findGreatestCommonDivisorOfArray, rollingMap, omitUndefinedValues, - findLast, } from "@ourworldindata/utils" import { StackedPointPositionType, StackedSeries } from "./StackedConstants" @@ -42,8 +41,8 @@ export const stackSeriesInBothDirections = < .map((s) => s.points[pointIndex]) const pointBelowThisOne = point.value < 0 - ? findLast(pointsBelowThisOne, (p) => p.value < 0) - : findLast(pointsBelowThisOne, (p) => p.value >= 0) + ? pointsBelowThisOne.findLast((p) => p.value < 0) + : pointsBelowThisOne.findLast((p) => p.value >= 0) point.valueOffset = pointBelowThisOne ? pointBelowThisOne.value + pointBelowThisOne.valueOffset : 0 diff --git a/packages/@ourworldindata/utils/src/Util.ts b/packages/@ourworldindata/utils/src/Util.ts index 567ba543efe..f9f7b7232d5 100644 --- a/packages/@ourworldindata/utils/src/Util.ts +++ b/packages/@ourworldindata/utils/src/Util.ts @@ -13,8 +13,6 @@ import { dropWhile, escapeRegExp, extend, - findLast, - findLastIndex, flatten, get, groupBy, @@ -87,8 +85,6 @@ export { dropWhile, escapeRegExp, extend, - findLast, - findLastIndex, flatten, get, groupBy, diff --git a/packages/@ourworldindata/utils/src/index.ts b/packages/@ourworldindata/utils/src/index.ts index 0cd96a487a0..e4ec7519807 100644 --- a/packages/@ourworldindata/utils/src/index.ts +++ b/packages/@ourworldindata/utils/src/index.ts @@ -156,8 +156,6 @@ export { dropRightWhile, dropWhile, extend, - findLast, - findLastIndex, flatten, get, groupBy,