We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c167edd commit 4089676Copy full SHA for 4089676
1 file changed
lib/OnyxCache.ts
@@ -356,7 +356,12 @@ class OnyxCache {
356
* Finds a key that can be safely evicted
357
*/
358
getKeyForEviction(): OnyxKey | undefined {
359
- return this.recentlyAccessedKeys.find((key) => !this.evictionBlocklist[key]);
+ for (const key of this.recentlyAccessedKeys) {
360
+ if (!this.evictionBlocklist[key]) {
361
+ return key;
362
+ }
363
364
+ return undefined;
365
}
366
367
0 commit comments