瀏覽代碼

Fix tags when loading a recipe without them

Tatiana Inama 6 年之前
父節點
當前提交
c00b22829e
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      recipes/src/containers/Recipes/Create/index.tsx

+ 3 - 1
recipes/src/containers/Recipes/Create/index.tsx

@@ -46,7 +46,9 @@ class CreateRecipe extends React.Component<any, CreateRecipeState> {
               details: {
                 ...recipe.details,
                 url: this.state.scrapeUrl,
-              }
+              },
+              tags: recipe.tags || [],
+              course: recipe.course || [],
             }
           })
         })