Skip to content

Commit 871474a

Browse files
razor-xphpnode
andauthored
Use template literal over join
Co-authored-by: Charles Pick <[email protected]>
1 parent b3de0cd commit 871474a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/seam/connect/seam-http-request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ export class SeamHttpRequest<
6060
: `/${this.#config.path}`
6161

6262
const path =
63-
params == null ? pathname : [pathname, serializer(params)].join('?')
63+
params == null ? pathname : `${pathname}?${serializer(params)}`
6464

65-
return new URL([origin, path].join(''))
65+
return new URL(`${origin}${path}`)
6666
}
6767

6868
public get method(): Method {
@@ -138,7 +138,7 @@ const getUrlPrefix = (input: string): string => {
138138
} catch (err: unknown) {
139139
if (globalThis.location != null) {
140140
const pathname = input.startsWith('/') ? input : `/${input}`
141-
return new URL([globalThis.location.origin, pathname].join('')).toString()
141+
return new URL(`${globalThis.location.origin}${pathname}`).toString()
142142
}
143143
throw err
144144
}

0 commit comments

Comments
 (0)