From 0dfff2bb7abd8f1c3aec11b6e452f42b56836641 Mon Sep 17 00:00:00 2001 From: Will Franklin Date: Thu, 5 Jan 2023 12:52:19 +0000 Subject: [PATCH] Fix errors from dependency upgrade --- src/core/lib/gocardless.ts | 2 +- src/tools/database/driers.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/gocardless.ts b/src/core/lib/gocardless.ts index 490de8eb2..247b5f3f8 100644 --- a/src/core/lib/gocardless.ts +++ b/src/core/lib/gocardless.ts @@ -39,7 +39,7 @@ gocardless.interceptors.request.use((config) => { }); if (config.method === "post") { - config.headers!["Idempotency-Key"] = uuidv4(); + (config.headers as any)["Idempotency-Key"] = uuidv4(); } return config; }); diff --git a/src/tools/database/driers.ts b/src/tools/database/driers.ts index d646a311f..0d45d1f9e 100644 --- a/src/tools/database/driers.ts +++ b/src/tools/database/driers.ts @@ -239,7 +239,7 @@ export default [ ] as ModelDrier[]; function isDrier(obj: DrierMap[keyof T]): obj is Drier { - return obj && "propMap" in obj; + return typeof obj === "object" && "propMap" in obj; } // Maps don't stringify well