Skip to content

Commit

Permalink
fix(effects): allows vars in Update Channel Reward cost (#2410)
Browse files Browse the repository at this point in the history
  • Loading branch information
zunderscore committed Feb 26, 2024
1 parent bd0d92e commit a1ae3b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/backend/effects/builtin/update-channel-reward.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const model: EffectType<EffectMeta> = {
<div class="control__indicator"></div>
</label>
<div ng-show="effect.rewardSettings.cost.update" style="margin-bottom: 15px;">
<firebot-input model="effect.rewardSettings.cost.newValue" data-type="number" placeholder-text="Enter number" />
<firebot-input model="effect.rewardSettings.cost.newValue" placeholder-text="Enter new cost" />
</div>
</div>
Expand Down Expand Up @@ -232,9 +232,7 @@ const model: EffectType<EffectMeta> = {
effect.rewardSettings.description.newValue === "")) {
errors.push("Please provide a new description for the reward.");
} else if (effect.rewardSettings.cost.update &&
(effect.rewardSettings.cost.newValue == null ||
isNaN(parseInt(effect.rewardSettings.cost.newValue)) ||
parseInt(effect.rewardSettings.cost.newValue) < 1)) {
!effect.rewardSettings.cost.newValue?.length) {
errors.push("Please provide a new cost for the reward.");
}

Expand Down

0 comments on commit a1ae3b2

Please sign in to comment.