Fix infinite render loop, fix repertoire entry removal
This commit is contained in:
@@ -79,7 +79,7 @@ interface CacheInterface<K, A, E> {
|
||||
/**
|
||||
* Retrieve the state currently stored in the cache for a given `key`.
|
||||
*/
|
||||
readonly getCurrent: (key: K) => Option.Option<State<A, E>>;
|
||||
readonly getCurrent: (key: K) => State<A, E> | undefined;
|
||||
/**
|
||||
* Set or update the value currently stored in the cache for a given `key`
|
||||
* and return the updated value. Running this effect while the state is
|
||||
@@ -163,7 +163,7 @@ export const make = <K, A, E>(fetchFn: FetchFn<K, A, E>): Cache<K, A, E> => {
|
||||
});
|
||||
});
|
||||
|
||||
const getCurrent = (key: K) => Option.fromNullable(stateMap.get(key));
|
||||
const getCurrent = (key: K) => stateMap.get(key);
|
||||
|
||||
const update = (key: K, action: Update<A>) => Effect.suspend(() => {
|
||||
const state = stateMap.get(key);
|
||||
|
||||
Reference in New Issue
Block a user