From a2888250f4ab3615c1590ab3bbf90302963a7c57 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 22 Apr 2016 00:59:05 +0200 Subject: 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. --- client/components/cards/labels.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'client/components/cards/labels.js') 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) { -- cgit v1.2.3-1-g7c22