From 9fa5ec971afeba84817ae3775e512694f1f07080 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 12 May 2023 10:59:41 -0500 Subject: [PATCH] Move `amount` check in bonus amount decorator to postConstruct --- src/features/decorators/bonusDecorator.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/features/decorators/bonusDecorator.ts b/src/features/decorators/bonusDecorator.ts index 636bfbe..7ee453d 100644 --- a/src/features/decorators/bonusDecorator.ts +++ b/src/features/decorators/bonusDecorator.ts @@ -69,14 +69,12 @@ export const bonusAmountDecorator: Decorator< BaseBonusAmountFeature, GenericBonusAmountFeature > = { - preConstruct(feature) { + postConstruct(feature) { if (feature.amount === undefined) { console.error( `Decorated feature ${feature.id} does not contain the required 'amount' property"` ); } - }, - postConstruct(feature) { processComputable(feature, "bonusAmount"); if (feature.totalAmount === undefined) { feature.totalAmount = computed(() =>