From bd2a640be056720b8735333ef7079bb899081e1e Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Wed, 3 Apr 2019 13:46:49 +0200 Subject: [PATCH 1/2] Remove default contributors value in propsal component It seems that this somehow prevents/overwrites the contributors which actually should be loaded in the controller. --- app/components/add-proposal/component.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/components/add-proposal/component.js b/app/components/add-proposal/component.js index a915805..10ea2b4 100644 --- a/app/components/add-proposal/component.js +++ b/app/components/add-proposal/component.js @@ -28,8 +28,6 @@ export default Component.extend({ description: null, url: null, }); - - this.set('contributors', []); }, didInsertElement() { From 3dbcba5eb2b1c70bef42e31528bc94b288595f3c Mon Sep 17 00:00:00 2001 From: Garret Alfert Date: Wed, 3 Apr 2019 14:25:59 +0200 Subject: [PATCH 2/2] Add empty array as default for contributors list --- app/components/add-proposal/component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/add-proposal/component.js b/app/components/add-proposal/component.js index 10ea2b4..2e65fdf 100644 --- a/app/components/add-proposal/component.js +++ b/app/components/add-proposal/component.js @@ -5,7 +5,7 @@ import { and, notEmpty } from '@ember/object/computed'; export default Component.extend({ attributes: null, - contributors: null, + contributors: Object.freeze([]), isValidContributor: notEmpty('contributorId'), isValidAmount: computed('amount', function() {