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.
1 parent 4dbddbf commit 581ba42Copy full SHA for 581ba42
src/start/RealmInputScreen.js
@@ -52,11 +52,10 @@ const tryParseInput = (realmInputValue: string): MaybeParsedInput => {
52
return { valid: false, error: ValidationError.Empty };
53
}
54
55
- const withScheme = /^https?:\/\//.test(trimmedInputValue)
56
- ? trimmedInputValue
57
- : `https://${trimmedInputValue}`;
58
-
59
- const url = tryParseUrl(withScheme);
+ let url = tryParseUrl(trimmedInputValue);
+ if (!/^https?:\/\//.test(trimmedInputValue)) {
+ url = tryParseUrl(`https://${trimmedInputValue}`);
+ }
60
61
if (!url) {
62
return { valid: false, error: ValidationError.InvalidUrl };
0 commit comments