Skip to content

Commit 6c36aee

Browse files
authored
Fixed wrong method call for LRU cache (#24477)
1 parent ce13860 commit 6c36aee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-devtools-shared/src/inspectedElementMutableSource.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function inspectElement({
102102
case 'not-found':
103103
// This is effectively a no-op.
104104
// If the Element is still in the Store, we can eagerly remove it from the Map.
105-
inspectedElementCache.remove(id);
105+
inspectedElementCache.del(id);
106106

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

packages/react-devtools-shared/src/types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ export type HookSourceLocationKey = string;
8686
export type HookNames = Map<HookSourceLocationKey, HookName>;
8787

8888
export type LRUCache<K, V> = {|
89+
del: (key: K) => void,
8990
get: (key: K) => V,
9091
has: (key: K) => boolean,
91-
remove: (key: K) => void,
9292
reset: () => void,
9393
set: (key: K, value: V) => void,
9494
|};

0 commit comments

Comments
 (0)