We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e0e522a + 8df26a5 commit 7d20bd4Copy full SHA for 7d20bd4
src/vector/platform/ElectronPlatform.tsx
@@ -474,10 +474,8 @@ export default class ElectronPlatform extends BasePlatform {
474
const url = super.getOidcCallbackUrl();
475
url.protocol = "io.element.desktop";
476
// 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));
+ if (url.href.startsWith(`${url.protocol}://`)) {
+ url.href = url.href.replace("://", ":/");
481
}
482
return url;
483
0 commit comments