From 4c904c2f06ad7fe6f6602d04cf14bcdaeab03ad2 Mon Sep 17 00:00:00 2001 From: Adam Ginzberg Date: Fri, 28 Feb 2020 07:54:48 -0800 Subject: [PATCH] fix: bump memoize-one and migrate new isEqual API (#1583) --- package.json | 2 +- src/utils/DateSlotMetrics.js | 3 ++- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 67c88d9e0..31e33eae1 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "invariant": "^2.2.4", "lodash": "^4.17.11", "lodash-es": "^4.17.11", - "memoize-one": "^4.0.3", + "memoize-one": "^5.1.1", "prop-types": "^15.6.2", "react-overlays": "^2.0.0-0", "uncontrollable": "^7.0.0" diff --git a/src/utils/DateSlotMetrics.js b/src/utils/DateSlotMetrics.js index 269d56ee9..873680653 100644 --- a/src/utils/DateSlotMetrics.js +++ b/src/utils/DateSlotMetrics.js @@ -4,7 +4,8 @@ import { eventSegments, endOfRange, eventLevels } from './eventLevels' let isSegmentInSlot = (seg, slot) => seg.left <= slot && seg.right >= slot -const isEqual = (a, b) => a.range === b.range && a.events === b.events +const isEqual = (a, b) => + a[0].range === b[0].range && a[0].events === b[0].events export function getSlotMetrics() { return memoize(options => { diff --git a/yarn.lock b/yarn.lock index b0839071a..130c50cef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8531,10 +8531,10 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memoize-one@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906" - integrity sha512-2GApq0yI/b22J2j9rhbrAlsHb0Qcz+7yWxeLG8h+95sl1XPUgeLimQSOdur4Vw7cUhrBHwaUZxWFZueojqNRzA== +memoize-one@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== memoizerific@^1.11.3: version "1.11.3"