Skip to content

Commit

Permalink
[Ingest] Fix package info request returning 500 (#61712) (#62846)
Browse files Browse the repository at this point in the history
* Fix 500 package info request error

* Fix installed packages page not loading

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
jen-huang and elasticmachine authored Apr 7, 2020
1 parent cfc0c97 commit 70f65e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 70f65e6

Please sign in to comment.