Skip to content

Commit

Permalink
Fixed wrong method call for LRU cache (#24477)
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed May 3, 2022
1 parent ce13860 commit 6c36aee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function inspectElement({
case 'not-found':
// This is effectively a no-op.
// If the Element is still in the Store, we can eagerly remove it from the Map.
inspectedElementCache.remove(id);
inspectedElementCache.del(id);

throw Error(`Element "${id}" not found`);

Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export type HookSourceLocationKey = string;
export type HookNames = Map<HookSourceLocationKey, HookName>;

export type LRUCache<K, V> = {|
del: (key: K) => void,
get: (key: K) => V,
has: (key: K) => boolean,
remove: (key: K) => void,
reset: () => void,
set: (key: K, value: V) => void,
|};
Expand Down

0 comments on commit 6c36aee

Please sign in to comment.