Skip to content

Commit

Permalink
fix: remove unnecessary template string
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwolz committed Jun 20, 2024
1 parent cc099f6 commit 6c4e22d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/capacitor/src/main/assets/native-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ var nativeBridge = (function (exports) {
if (isRelativeOrProxyUrl(url))
return url;
const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : '');
bridgeUrl.pathname = `${CAPACITOR_HTTP_INTERCEPTOR}`;
bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR;
// URLSearchParams `append()` method will automatically percent encode the url
bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url);
return bridgeUrl.toString();
Expand Down
2 changes: 1 addition & 1 deletion core/native-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const isRelativeOrProxyUrl = (url: string | undefined): boolean =>
const createProxyUrl = (url: string, win: WindowCapacitor): string => {
if (isRelativeOrProxyUrl(url)) return url;
const bridgeUrl = new URL(win.Capacitor?.getServerUrl() ?? '');
bridgeUrl.pathname = `${CAPACITOR_HTTP_INTERCEPTOR}`;
bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR;
// URLSearchParams `append()` method will automatically percent encode the url
bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url);

Expand Down
2 changes: 1 addition & 1 deletion ios/Capacitor/Capacitor/assets/native-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ var nativeBridge = (function (exports) {
if (isRelativeOrProxyUrl(url))
return url;
const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : '');
bridgeUrl.pathname = `${CAPACITOR_HTTP_INTERCEPTOR}`;
bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR;
// URLSearchParams `append()` method will automatically percent encode the url
bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url);
return bridgeUrl.toString();
Expand Down

0 comments on commit 6c4e22d

Please sign in to comment.