EventDetail: Fix crash on FB link press

This commit is contained in:
Nikolai R Kristiansen committed 2017-09-20 21:01:20 +02:00
1 parent 96a1b47d83
commit 862cdcacf2
1 file changed
+1 -1
+1 -1
View File
@@ -81,7 +81,7 @@ export default class EventDetail extends Component {
const fbEventPattern = /https?:\/\/www\.facebook\.com\/events\/(\d+)\/?/i;
const matches = fbEventPattern.exec(link);
let iosURL = link;
if( matches.length ) {
if( matches && matches.length ) {
iosURL = 'fb://event/?id=' + matches[1];
}
const url = Platform.select({