diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-03-18 16:37:21 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-03-18 16:37:21 +0100 |
commit | 88faef416eadc891537f03926160e35245125c72 (patch) | |
tree | db97bb469dcda8fb32a52b2c859b3b9988ad3cc5 /src/stores/ServicesStore.js | |
parent | fix(Service Tabs): Remove "delete service" context menu when not in developme... (diff) | |
download | ferdium-app-88faef416eadc891537f03926160e35245125c72.tar.gz ferdium-app-88faef416eadc891537f03926160e35245125c72.tar.zst ferdium-app-88faef416eadc891537f03926160e35245125c72.zip |
Replace console logs with debugger
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index c38d0d9ee..0d9ff7f9b 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -10,6 +10,8 @@ import CachedRequest from './lib/CachedRequest'; | |||
10 | import { matchRoute } from '../helpers/routing-helpers'; | 10 | import { matchRoute } from '../helpers/routing-helpers'; |
11 | import { gaEvent } from '../lib/analytics'; | 11 | import { gaEvent } from '../lib/analytics'; |
12 | 12 | ||
13 | const debug = require('debug')('ServiceStore'); | ||
14 | |||
13 | export default class ServicesStore extends Store { | 15 | export default class ServicesStore extends Store { |
14 | @observable allServicesRequest = new CachedRequest(this.api.services, 'all'); | 16 | @observable allServicesRequest = new CachedRequest(this.api.services, 'all'); |
15 | @observable createServiceRequest = new Request(this.api.services, 'create'); | 17 | @observable createServiceRequest = new Request(this.api.services, 'create'); |
@@ -103,7 +105,7 @@ export default class ServicesStore extends Store { | |||
103 | return activeService; | 105 | return activeService; |
104 | } | 106 | } |
105 | 107 | ||
106 | console.warn('Service not available'); | 108 | debug('Service not available'); |
107 | } | 109 | } |
108 | 110 | ||
109 | return null; | 111 | return null; |
@@ -117,10 +119,10 @@ export default class ServicesStore extends Store { | |||
117 | const recipesStore = this.stores.recipes; | 119 | const recipesStore = this.stores.recipes; |
118 | 120 | ||
119 | if (recipesStore.isInstalled(recipeId)) { | 121 | if (recipesStore.isInstalled(recipeId)) { |
120 | console.debug('Recipe is installed'); | 122 | debug(`Recipe ${recipeId} is installed`); |
121 | this._redirectToAddServiceRoute(recipeId); | 123 | this._redirectToAddServiceRoute(recipeId); |
122 | } else { | 124 | } else { |
123 | console.warn('Recipe is not installed'); | 125 | debug(`Recipe ${recipeId} is not installed`); |
124 | // We access the RecipeStore action directly | 126 | // We access the RecipeStore action directly |
125 | // returns Promise instead of action | 127 | // returns Promise instead of action |
126 | await this.stores.recipes._install({ recipeId }); | 128 | await this.stores.recipes._install({ recipeId }); |
@@ -487,7 +489,7 @@ export default class ServicesStore extends Store { | |||
487 | if (service) { | 489 | if (service) { |
488 | service.webview.openDevTools(); | 490 | service.webview.openDevTools(); |
489 | } else { | 491 | } else { |
490 | console.warn('No service is active'); | 492 | debug('No service is active'); |
491 | } | 493 | } |
492 | } | 494 | } |
493 | 495 | ||