diff --git a/js/components/forms/new_project.js b/js/components/forms/new_project.js index cbea6161..1565cadc 100644 --- a/js/components/forms/new_project.js +++ b/js/components/forms/new_project.js @@ -1,5 +1,7 @@ import textinput from '../text_input' +const createEnvironment = (name) => ({ name }) + export default { name: 'new-project', @@ -18,7 +20,7 @@ export default { const { name, description, - environments = [''] + environments = [ createEnvironment() ] } = this.initialData return { @@ -34,7 +36,7 @@ export default { methods: { addEnvironment: function (event) { - this.environments.push('') + this.environments.push(createEnvironment("")) }, removeEnvironment: function (index) { diff --git a/templates/workspace_project_new.html b/templates/workspace_project_new.html index 85cdf673..877729fb 100644 --- a/templates/workspace_project_new.html +++ b/templates/workspace_project_new.html @@ -34,13 +34,14 @@ + {{ form.environment_names.errors }}