-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
TypeError: Cannot read properties of undefined (reading 'key') #597
Comments
It was reported in
|
We have this too. We can't reliably reproduce it I'm afraid. For us, it mainly seems to happen after leaving the list open for a while, and then coming back to it (refocussing). I could be wrong though |
I have a reliable reproduction! For me it happens:
I believe what's happening is I am setting the diff --git a/src/features/community/list/ResolvedCommunitiesList.tsx b/src/features/community/list/ResolvedCommunitiesList.tsx
index e5c39b46..18cb02cd 100644
--- a/src/features/community/list/ResolvedCommunitiesList.tsx
+++ b/src/features/community/list/ResolvedCommunitiesList.tsx
@@ -216,7 +216,9 @@ function ResolvedCommunitiesList({
updateActiveIndex();
}}
as={IonList as CustomContainerComponent}
- keepMounted={activeIndex >= 0 ? [activeIndex] : []}
+ keepMounted={
+ activeIndex >= 0 && activeIndex < items.length ? [activeIndex] : []
+ }
item={StickyItem}
>
{items.map((item, index) => ( See here for more: aeharding/voyager#1799 (comment) Not sure if this is the same issue everyone else is experiencing? If so maybe Virtua could add a sanity check and ignore out of bounds |
Ah yes! Smoking gun. We're also using |
Thanks for the help! Although, I got the same error without |
Discussed in #592
Originally posted by mariia-mitiureva December 24, 2024
After updating to 0.39.2 sometimes (quite rare) it crashes with the following error:
I happens randomly, not sure what can be a trigger. Did it happen to someone else?
The text was updated successfully, but these errors were encountered: