Skip to content
Myr

fix(client): Web query undefined check (#1340)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Added check for undefined in query * denofied

authored by Tanner Scadden · committed by GitHub · parent 49ce537 · Browse files · 2 files+10 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+10 added−2 removed

  • other:+10 added−2 removed

2 files+10 added−2 removed

modified:deno_dist/client/client.ts+5 added-1 removed
modified:src/client/client.ts+5 added-1 removed
1import type { Hono } from '../hono'2import type { ValidationTargets } from '../types'3import type { UnionToIntersection } from '../utils/types'4import type { Callback, Client, ClientRequestOptions } from './types'5import { replaceUrlParam, mergePath, removeIndexString, deepMerge } from './utils'5import { deepMerge, mergePath, removeIndexString, replaceUrlParam } from './utils'67const createProxy = (callback: Callback, path: string[]) => {8 const proxy: unknown = new Proxy(() => {}, {9 get(_obj, key) {
30 unmodified lines
40 ) => {41 if (args) {42 if (args.query) {43 for (const [k, v] of Object.entries(args.query)) {44 if (v === undefined) {45 return46 }4748 this.queryParams ||= new URLSearchParams()49 if (Array.isArray(v)) {50 for (const v2 of v) {51 this.queryParams.append(k, v2)
87 unmodified lines