From 786cc9f1c9cc3317231d58346a5a2e97483e6af3 Mon Sep 17 00:00:00 2001 From: Ryan Goree Date: Fri, 13 Dec 2024 20:31:10 -0600 Subject: [PATCH] Patch function overload handling in `objectToArray` --- .changeset/tough-lobsters-destroy.md | 5 +++++ packages/drift/src/adapter/utils/objectToArray.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tough-lobsters-destroy.md diff --git a/.changeset/tough-lobsters-destroy.md b/.changeset/tough-lobsters-destroy.md new file mode 100644 index 0000000..8983595 --- /dev/null +++ b/.changeset/tough-lobsters-destroy.md @@ -0,0 +1,5 @@ +--- +"@delvtech/drift": patch +--- + +Patched overloaded function handling in `objectToArray` diff --git a/packages/drift/src/adapter/utils/objectToArray.ts b/packages/drift/src/adapter/utils/objectToArray.ts index 0f82b86..879ed13 100644 --- a/packages/drift/src/adapter/utils/objectToArray.ts +++ b/packages/drift/src/adapter/utils/objectToArray.ts @@ -109,7 +109,7 @@ export function objectToArray< for (const [i, input] of entry.inputs.entries()) { const key = input.name || i; if (key in args) potentialKeyMatchCount++; - arrayArgs.push(args[key]); + potentialArrayArgs.push(args[key]); } if (potentialKeyMatchCount > keyMatchCount) {