Skip to content

Commit 4cfa622

Browse files
committed
fix issue where link url in openUrl function is not defined when clicking on that item will crash the app.
1 parent e0f1141 commit 4cfa622

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/util/openUrl.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Linking } from 'react-native';
22

3-
export default function openUrl(url){
4-
Linking.openURL(url);
5-
};
3+
export default function openUrl(url) {
4+
if (url) {
5+
Linking.openURL(url);
6+
}
7+
}

0 commit comments

Comments
 (0)