We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23174f9 commit 99d1c01Copy full SHA for 99d1c01
src/stores/UserStore.js
@@ -192,6 +192,15 @@ export default class UserStore extends Store {
192
@action async _importLegacyServices({ services }) {
193
this.isImportLegacyServicesExecuting = true;
194
195
+ // Reduces recipe duplicates
196
+ const recipes = services.filter((obj, pos, arr) => arr.map(mapObj => mapObj.recipe.id).indexOf(obj.recipe.id) === pos).map(s => s.recipe.id);
197
+
198
+ // Install recipes
199
+ for (const recipe of recipes) {
200
+ // eslint-disable-next-line
201
+ await this.stores.recipes._install({ recipeId: recipe });
202
+ }
203
204
for (const service of services) {
205
this.actions.service.createFromLegacyService({
206
data: service,
0 commit comments