From b4b46bdecc64065256147b038535d75d30651f64 Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Fri, 18 Oct 2019 12:55:58 +0700 Subject: Safe access variable in _checkIfRecipeIsInstalled --- src/stores/RecipesStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/RecipesStore.js b/src/stores/RecipesStore.js index 7f91049df..8b2bde5df 100644 --- a/src/stores/RecipesStore.js +++ b/src/stores/RecipesStore.js @@ -108,7 +108,7 @@ export default class RecipesStore extends Store { async _checkIfRecipeIsInstalled() { const { router } = this.stores; - const match = matchRoute('/settings/services/add/:id', router.location.pathname); + const match = router.location && matchRoute('/settings/services/add/:id', router.location.pathname); if (match) { const recipeId = match.id; -- cgit v1.2.3-70-g09d2