Skip to content
Myr

refactor: remove useless spread (#3600)

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

* refactor: remove useless spread * refactor: remove useless spread fallback * refactor(adapter/lambda-edge): remove unneeded ternary operators * refactor: remove useless fallback ---------

authored by TATSUNO “Taz” Yasuhiro · committed by GitHub · parent 1af7e58 · Browse files · 3 files+6 added−9 removed
This commit

State

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

Trailers

  • Co-authored-by: EdamAmex <121654029+EdamAme-x@users.noreply.github.com>

Diff stats

3 files+6 added−9 removed

  • other:+6 added−9 removed

3 files+6 added−9 removed

modified:src/adapter/lambda-edge/handler.ts+1 added-1 removed
modified:src/client/client.ts+3 added-7 removed
78 unmodified lines
7980 let methodUpperCase = this.method.toUpperCase()8182 const headerValues: Record<string, string> = {83 ...(args?.header ?? {}),84 ...(typeof opt?.headers === 'function'85 ? await opt.headers()86 : opt?.headers87 ? opt.headers88 : {}),83 ...args?.header,84 ...(typeof opt?.headers === 'function' ? await opt.headers() : opt?.headers),85 }8687 if (args?.cookie) {88 const cookies: string[] = []
107 unmodified lines
196197 const req = new ClientRequestImpl(url, method)198 if (method) {199 options ??= {}204 const args = deepMerge<ClientRequestOptions>(options, { ...(opts.args[1] ?? {}) })200 const args = deepMerge<ClientRequestOptions>(options, { ...opts.args[1] })201 return req.fetch(opts.args[0], args)202 }203 return req204 }, []) as UnionToIntersection<Client<T>>
modified:src/middleware/jsx-renderer/index.ts+2 added-1 removed
42 unmodified lines
43 const currentLayout = component44 ? jsx(45 (props: any) => component(props, c),46 {47 ...{ Layout, ...(props as any) },47 Layout,48 ...(props as any),49 },50 children as any51 )52 : children
107 unmodified lines