mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-22 08:31:31 +00:00
Move amount
check in bonus amount decorator to postConstruct
This commit is contained in:
parent
01b357a6a2
commit
a28c363b74
1 changed files with 1 additions and 3 deletions
|
@ -69,14 +69,12 @@ export const bonusAmountDecorator: Decorator<
|
||||||
BaseBonusAmountFeature,
|
BaseBonusAmountFeature,
|
||||||
GenericBonusAmountFeature
|
GenericBonusAmountFeature
|
||||||
> = {
|
> = {
|
||||||
preConstruct(feature) {
|
postConstruct(feature) {
|
||||||
if (feature.amount === undefined) {
|
if (feature.amount === undefined) {
|
||||||
console.error(
|
console.error(
|
||||||
`Decorated feature ${feature.id} does not contain the required 'amount' property"`
|
`Decorated feature ${feature.id} does not contain the required 'amount' property"`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
postConstruct(feature) {
|
|
||||||
processComputable(feature, "bonusAmount");
|
processComputable(feature, "bonusAmount");
|
||||||
if (feature.totalAmount === undefined) {
|
if (feature.totalAmount === undefined) {
|
||||||
feature.totalAmount = computed(() =>
|
feature.totalAmount = computed(() =>
|
||||||
|
|
Loading…
Reference in a new issue