summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-04-22 00:59:05 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-06-03 03:56:35 +0200
commita2888250f4ab3615c1590ab3bbf90302963a7c57 (patch)
treef72abd0d33187b8240b913fdb2490d1e85fc7b6c /client/components
parent14e2b3c15fdaaa7a45716041dd9e44740a747b26 (diff)
downloadwekan-a2888250f4ab3615c1590ab3bbf90302963a7c57.tar.gz
wekan-a2888250f4ab3615c1590ab3bbf90302963a7c57.tar.bz2
wekan-a2888250f4ab3615c1590ab3bbf90302963a7c57.zip
Models: Replace before.insert with autoValues
The before.insert hooks have the problem, that they are executed in a different order if called from the client or from the server. If called from the client, the before.insert hook is called before validation of the schema, but if called from the server, the validation is called first and fails.
Diffstat (limited to 'client/components')
-rw-r--r--client/components/cards/labels.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/client/components/cards/labels.js b/client/components/cards/labels.js
index 20d95bc6..cdd5a700 100644
--- a/client/components/cards/labels.js
+++ b/client/components/cards/labels.js
@@ -9,9 +9,7 @@ BlazeComponent.extendComponent({
},
labels() {
- return labelColors.map((color) => {
- return { color, name: '' };
- });
+ return labelColors.map((color) => ({ color, name: '' }));
},
isSelected(color) {