From eba50bc5a41b8492c0350b73936405eab1b8c453 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Wed, 12 Jun 2019 15:16:56 +0200 Subject: fix(Recipes): Fix recipe install when directly accessing recipe --- src/stores/ServicesStore.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/stores/ServicesStore.js') diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index d63302fce..109ac5cd7 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -148,18 +148,7 @@ export default class ServicesStore extends Store { } async _showAddServiceInterface({ recipeId }) { - const recipesStore = this.stores.recipes; - - if (recipesStore.isInstalled(recipeId)) { - debug(`Recipe ${recipeId} is installed`); - this._redirectToAddServiceRoute(recipeId); - } else { - debug(`Recipe ${recipeId} is not installed`); - // We access the RecipeStore action directly - // returns Promise instead of action - await this.stores.recipes._install({ recipeId }); - this._redirectToAddServiceRoute(recipeId); - } + this.stores.router.push(`/settings/services/add/${recipeId}`); } // Actions @@ -690,11 +679,6 @@ export default class ServicesStore extends Store { } // Helper - _redirectToAddServiceRoute(recipeId) { - const route = `/settings/services/add/${recipeId}`; - this.stores.router.push(route); - } - _initializeServiceRecipeInWebview(serviceId) { const service = this.one(serviceId); -- cgit v1.2.3-54-g00ecf