mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Ingest] Fix package info request returning 500 (#61712)
* Fix 500 package info request error * Fix installed packages page not loading Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
4cb96ee74a
commit
2ae566ec78
2 changed files with 1 additions and 3 deletions
|
@ -59,7 +59,7 @@ const usePackageIcon = (packageName: string, version?: string, icons?: Package['
|
|||
}
|
||||
|
||||
// Use API to see if package has icons defined
|
||||
if (!icons && version !== undefined) {
|
||||
if (!icons && version) {
|
||||
fromPackageInfo(pkgKey)
|
||||
.catch(() => undefined) // ignore API errors
|
||||
.then(fromInput);
|
||||
|
|
|
@ -15,8 +15,6 @@ export function useLocalSearch(packageList: PackageList) {
|
|||
const localSearchRef = useRef<LocalSearch | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!packageList.length) return;
|
||||
|
||||
const localSearch = new LocalSearch(searchIdField);
|
||||
fieldsToSearch.forEach(field => localSearch.addIndex(field));
|
||||
localSearch.addDocuments(packageList);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue