mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 14:09:46 +03:00
Fix
This commit is contained in:
parent
6b1d60da7d
commit
1c8658b8c7
|
@ -6,10 +6,10 @@ function iterateToKey(obj: any, key: string | number) {
|
|||
let idx = 0;
|
||||
for (const entry of obj) {
|
||||
if (Array.isArray(entry)) {
|
||||
if (entry[0] === key) return entry[1];
|
||||
if (entry[0] === (key as string)) return entry[1];
|
||||
} else {
|
||||
if (idx > key) return;
|
||||
if (idx === key) return entry;
|
||||
if (idx > (key as number)) return;
|
||||
if (idx === (key as number)) return entry;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user