Skip to content

Commit 4519bef

Browse files
kriszypclaude
andcommitted
fix(resources): broaden arg normalizer guard to URLSearchParams (not just RequestTarget)
RequestTarget extends URLSearchParams, and raw URLSearchParams are also supported as query targets (line 579). Using URLSearchParams in the guard covers both forms and is more robust. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2fbfeb1 commit 4519bef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

resources/Resource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ function transactional(
524524
if (
525525
typeof idOrQuery === 'object' &&
526526
idOrQuery &&
527-
!(idOrQuery instanceof RequestTarget) &&
527+
!(idOrQuery instanceof URLSearchParams) &&
528528
(!Array.isArray(idOrQuery) || typeof idOrQuery[0] === 'object')
529529
) {
530530
// (data, context) form

0 commit comments

Comments
 (0)