Skip to content

Commit

Permalink
[Resolver] Fix bug where process detail panel doesn't show up (elasti…
Browse files Browse the repository at this point in the history
…c#71754) (elastic#71957)

Co-authored-by: Brent Kimmel <bkimmel@users.noreply.github.com>
  • Loading branch information
Robert Austin and bkimmel authored Jul 15, 2020
1 parent d77dbe4 commit 24f211d
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ export function useResolverQueryParams() {
const parsed = querystring.parse(urlSearch.slice(1));
const crumbEvent = parsed[uniqueCrumbEventKey];
const crumbId = parsed[uniqueCrumbIdKey];
function valueForParam(param: string | string[]): string {
if (Array.isArray(param)) {
return param[0] || '';
}
return param || '';
}
return {
crumbEvent: Array.isArray(crumbEvent) ? crumbEvent[0] : crumbEvent,
crumbId: Array.isArray(crumbId) ? crumbId[0] : crumbId,
crumbEvent: valueForParam(crumbEvent),
crumbId: valueForParam(crumbId),
};
}, [urlSearch, uniqueCrumbIdKey, uniqueCrumbEventKey]);

Expand Down

0 comments on commit 24f211d

Please sign in to comment.