Skip to content

Commit 7d20bd4

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents e0e522a + 8df26a5 commit 7d20bd4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vector/platform/ElectronPlatform.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,8 @@ export default class ElectronPlatform extends BasePlatform {
474474
const url = super.getOidcCallbackUrl();
475475
url.protocol = "io.element.desktop";
476476
// Trim the double slash into a single slash to comply with https://datatracker.ietf.org/doc/html/rfc8252#section-7.1
477-
// Chrome seems to have a strange issue where non-standard protocols prevent URL object mutations on pathname
478-
// field, so we cannot mutate `pathname` reliably and instead have to rewrite the href manually.
479-
if (url.pathname.startsWith("//")) {
480-
url.href = url.href.replace(url.pathname, url.pathname.slice(1));
477+
if (url.href.startsWith(`${url.protocol}://`)) {
478+
url.href = url.href.replace("://", ":/");
481479
}
482480
return url;
483481
}

0 commit comments

Comments
 (0)