Skip to content

Commit

Permalink
[Resolver] Fix bug where process detail panel doesn't show up (#71754)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimmel authored Jul 15, 2020
1 parent a3767d2 commit 755f9f4
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 755f9f4

Please sign in to comment.