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 e8c2a86 + c1e3399 commit 7486041Copy full SHA for 7486041
packages/uikit-react-native/src/libs/SBUUtils.ts
@@ -11,7 +11,10 @@ export default class SBUUtils {
11
12
static async openURL(url: string) {
13
try {
14
- const targetUrl = url.startsWith('http') ? url : 'https://' + url;
+ let targetUrl = url;
15
+ if (!url.startsWith('http://') && !url.startsWith('https://')) {
16
+ targetUrl = 'https://' + url;
17
+ }
18
await Linking.openURL(targetUrl);
19
} catch (e) {
20
Logger.warn('Cannot open url', e);
0 commit comments