@samitouri / QOS-React-2 / commits / 6c36aee944

Fixed wrong method call for LRU cache (#24477)

Brian Vaughn committed May 2, 2022 at 18:17 UTC 6c36aee9443d4b30d13137dbb1660f73522aa3c9
2 files changed +2 -2
packages/react-devtools-shared/src/inspectedElementMutableSource.js
+1 -1
@@ -102,7 +102,7 @@ export function inspectElement({
102 case 'not-found':
103 // This is effectively a no-op.
104 // If the Element is still in the Store, we can eagerly remove it from the Map.
105 - inspectedElementCache.remove(id);
105 + inspectedElementCache.del(id);
106
107 throw Error(`Element "${id}" not found`);
108
packages/react-devtools-shared/src/types.js
+1 -1
@@ -86,9 +86,9 @@ export type HookSourceLocationKey = string;
86 export type HookNames = Map<HookSourceLocationKey, HookName>;
87
88 export type LRUCache<K, V> = {|
89 + del: (key: K) => void,
90 get: (key: K) => V,
91 has: (key: K) => boolean,
91 - remove: (key: K) => void,
92 reset: () => void,
93 set: (key: K, value: V) => void,
94 |};