Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed wrong method call for LRU cache #24477

Merged
merged 1 commit into from May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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