Skip to content

Commit bb6f11e

Browse files
fix(forex): resolve TypeScript error in extract helper type
Co-Authored-By: Patrick Munis <pmunis@gmail.com>
1 parent b48a632 commit bb6f11e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/pwa/src/app/forex/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ export default function ForexTradingPage() {
264264
api.forex.regulatory(),
265265
]);
266266

267-
const extract = (res: PromiseSettledResult<Record<string, unknown>>, key: string) => {
267+
const extract = (res: PromiseSettledResult<unknown>, key: string) => {
268268
if (res.status !== "fulfilled") return null;
269-
const d = res.value;
269+
const d = res.value as Record<string, unknown> | null;
270270
const inner = d && typeof d === "object" && "data" in d ? d.data as Record<string, unknown> : d;
271271
return inner && typeof inner === "object" && key in inner ? (inner as Record<string, unknown>)[key] : null;
272272
};

0 commit comments

Comments
 (0)