Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform]: Replace unsafe destructuring assignments on study page #558

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/sections/src/study/GWASCredibleSets/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const columns = [
tooltip: "Top gene prioritised by our locus-to-gene model",
filterValue: ({ l2Gpredictions }) => l2Gpredictions?.[0]?.target.approvedSymbol,
renderCell: ({ l2Gpredictions }) => {
const { target } = l2Gpredictions?.[0];
const target = l2Gpredictions?.[0]?.target;
if (!target) return naLabel;
return <Link to={`/target/${target.id}`}>{target.approvedSymbol}</Link>;
},
Expand All @@ -106,7 +106,7 @@ const columns = [
sortable: true,
filterValue: false,
renderCell: ({ l2Gpredictions }) => {
const { score } = l2Gpredictions?.[0];
const score = l2Gpredictions?.[0]?.score;
if (typeof score !== "number") return naLabel;
return score.toFixed(3);
},
Expand Down
Loading