From 95dec84fc58cb0b1682a06b5614d0b49dd2623cd Mon Sep 17 00:00:00 2001 From: Mateo Date: Fri, 26 Apr 2019 07:43:13 +0200 Subject: [PATCH 1/2] fixed oob bug and removed unused imports --- shoutem.preview/app/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shoutem.preview/app/app.js b/shoutem.preview/app/app.js index d7e91297..ba748449 100644 --- a/shoutem.preview/app/app.js +++ b/shoutem.preview/app/app.js @@ -2,15 +2,13 @@ import { Linking } from 'react-native'; import { RESTART_APP, - openInitialScreen, - actions, isProduction, getAppId, } from 'shoutem.application'; function getAppIdFromUrl(url) { const matches = url.match(/preview:\/\/open-app\/([0-9]*)/); - return matches.length ? matches[1] : undefined; + return matches.length >= 2 ? matches[1] : undefined; } function listenForDeepLinks(dispatch) { From 03173d5c6a5df2192fa44d1a246519d4bd4e1006 Mon Sep 17 00:00:00 2001 From: Mateo Hrastnik Date: Mon, 29 Apr 2019 11:51:40 +0200 Subject: [PATCH 2/2] fixed crash where matches is null --- shoutem.preview/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shoutem.preview/app/app.js b/shoutem.preview/app/app.js index ba748449..df3e630a 100644 --- a/shoutem.preview/app/app.js +++ b/shoutem.preview/app/app.js @@ -8,7 +8,7 @@ import { function getAppIdFromUrl(url) { const matches = url.match(/preview:\/\/open-app\/([0-9]*)/); - return matches.length >= 2 ? matches[1] : undefined; + return matches && matches.length >= 2 ? matches[1] : undefined; } function listenForDeepLinks(dispatch) {