on master help sign in
devex: improve pointcache race condition fix
commit73d2203a48e005a581cd412e9c85c40d120ef8e7 authortomholford <tomholford@users.noreply.github.com> dateTue 18 Oct 2022, 13:40 (4 years ago) parent016cde3
1 file changed+8−6
src/store/pointCache.jsx+8−6
src/store/pointCache.jsx+8−6
@@ -1,6 +1,7 @@
11import { Just, Nothing } from 'folktale/maybe';
22import Result from 'folktale/result';
33import React, { createContext, forwardRef, useContext } from 'react';
4+import { noop } from 'lodash';
45
56import useDeepEqualReference from 'lib/useDeepEqualReference';
67import usePointStore from './lib/usePointStore';
@@ -17,12 +18,13 @@ const initialContext = {
1718 controlledPoints: Just(Result.Error('not yet loaded')),
1819 ecliptic: Nothing(),
1920 residents: Nothing(),
20− syncDetails: () => [],
21− syncRekeyDate: () => [],
22− syncControlledPoints: () => [],
23− syncDates: () => [],
24− syncResidents: () => [],
25− syncExtras: () => [],
21+ syncDetails: noop,
22+ syncEclipticOwner:noop,
23+ syncRekeyDate: noop,
24+ syncControlledPoints: noop,
25+ syncDates: noop,
26+ syncResidents: noop,
27+ syncExtras: noop,
2628}
2729
2830export const PointCacheContext = createContext(initialContext);