Skip to content

Commit a3eb997

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 32d7c26 commit a3eb997

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
@@ -530,7 +530,7 @@ function transactional(
530530
if (
531531
typeof idOrQuery === 'object' &&
532532
idOrQuery &&
533-
!(idOrQuery instanceof RequestTarget) &&
533+
!(idOrQuery instanceof URLSearchParams) &&
534534
(!Array.isArray(idOrQuery) || typeof idOrQuery[0] === 'object')
535535
) {
536536
// (data, context) form

0 commit comments

Comments
 (0)