summaryrefslogtreecommitdiffstats
path: root/src/models/Service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Service.ts')
-rw-r--r--src/models/Service.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/models/Service.ts b/src/models/Service.ts
index 0cbfa60e2..af0085185 100644
--- a/src/models/Service.ts
+++ b/src/models/Service.ts
@@ -1,12 +1,11 @@
1import { autorun, action, computed, makeObservable, observable } from 'mobx'; 1import { autorun, action, computed, makeObservable, observable } from 'mobx';
2import { ipcRenderer } from 'electron'; 2import { ipcRenderer } from 'electron';
3import { webContents } from '@electron/remote'; 3import { webContents } from '@electron/remote';
4import normalizeUrl from 'normalize-url';
5import { join } from 'path'; 4import { join } from 'path';
6import ElectronWebView from 'react-electron-web-view'; 5import ElectronWebView from 'react-electron-web-view';
7 6
8import { todosStore } from '../features/todos'; 7import { todosStore } from '../features/todos';
9import { isValidExternalURL } from '../helpers/url-helpers'; 8import { isValidExternalURL, normalizedUrl } from '../helpers/url-helpers';
10import UserAgent from './UserAgent'; 9import UserAgent from './UserAgent';
11import { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } from '../config'; 10import { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } from '../config';
12import { ifUndefined } from '../jsUtils'; 11import { ifUndefined } from '../jsUtils';
@@ -327,11 +326,7 @@ export default class Service {
327 if (this.recipe.hasCustomUrl && this.customUrl) { 326 if (this.recipe.hasCustomUrl && this.customUrl) {
328 let url: string = ''; 327 let url: string = '';
329 try { 328 try {
330 url = normalizeUrl(this.customUrl, { 329 url = normalizedUrl(this.customUrl);
331 stripAuthentication: false,
332 stripWWW: false,
333 removeTrailingSlash: false,
334 });
335 } catch { 330 } catch {
336 console.error( 331 console.error(
337 `Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`, 332 `Service (${this.recipe.name}): '${this.customUrl}' is not a valid Url.`,