diff --git a/aiChat/mixins/chatMixinsV2.js b/aiChat/mixins/chatMixinsV2.js index 10ac0c8..b5fc49d 100644 --- a/aiChat/mixins/chatMixinsV2.js +++ b/aiChat/mixins/chatMixinsV2.js @@ -885,6 +885,18 @@ export const chatMixinsV2 = { this.currentGiftStepIndex-- } }, + clearCurrentGiftStepData() { + const currentStep = this.giftBuyOptions[this.currentGiftStepIndex] + if (!currentStep) return + + if (currentStep.type === 'option_card') { + const nextSelections = { ...this.giftSelections } + delete nextSelections[currentStep.id] + this.giftSelections = nextSelections + } else if (currentStep.type === 'price_input') { + this.giftBudget = '' + } + }, nextGiftStep() { const currentStep = this.giftBuyOptions[this.currentGiftStepIndex] let hasSelection = false @@ -912,6 +924,7 @@ export const chatMixinsV2 = { } }, skipGiftStep() { + this.clearCurrentGiftStepData() if (this.currentGiftStepIndex < this.giftBuyOptions.length - 1) { this.currentGiftStepIndex++ } else {