Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 7415fae

Browse files
authored
Merge pull request #1500 from nya3jp/searchbox
Fix library search result rendering
2 parents d4500e6 + 0cbcd19 commit 7415fae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/views/app/components/LibraryManager.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ class LibraryManager extends React.Component<ILibraryManagerProps, ILibraryManag
137137
const isOperating = !!this.props.installingLibraryName || !!this.props.uninstallingLibraryName;
138138

139139
const itemRenderer = (index, key) => {
140+
// On updating a list, ReactList can call itemRenderer with large indices.
141+
if (index >= filteredLibraries.length) {
142+
return null;
143+
}
140144
return (<LibraryItemView key={filteredLibraries[index].name} library={filteredLibraries[index]} {...libraryItemProps}/>);
141145
};
142146
const itemSizeEstimator = (index, cache) => {

0 commit comments

Comments
 (0)