fix: Trim origin url in desktop

This commit is contained in:
Susmitha Girumala committed 2021-04-13 16:57:07 -04:00
1 parent 18e95435f5
commit e894dbc4e8
2 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -66,7 +66,8 @@ export default class OriginService extends Service {
// Silently drop trailing slashes if present.
// This is important since API paths that will be appended to the origin
// will include preceeding slashes already.
origin = origin.replace(/\/*$/, '');
// Trim whitespaces around origin.
origin = origin.replace(/\/*$/, '').trim();
this.adapter.host = origin;
this.rendererOrigin = origin;
if (origin !== (await this.mainOrigin)) {