mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix(subs): escape group demographics without group
This commit is contained in:
@@ -326,21 +326,6 @@ export default {
|
|||||||
isFromBalance () {
|
isFromBalance () {
|
||||||
return this.paymentData.paymentType === 'gift-gems-balance';
|
return this.paymentData.paymentType === 'gift-gems-balance';
|
||||||
},
|
},
|
||||||
// upgradedGroup () {
|
|
||||||
// const upgradedGroup = (this.paymentData.paymentType === 'groupPlan'
|
|
||||||
// && !this.paymentData.newGroup);
|
|
||||||
// const demographicsKey = upgradedGroup.demographics;
|
|
||||||
// const upgradedGroupName = upgradedGroup.name;
|
|
||||||
// const upgradedGroupType = upgradedGroup.type;
|
|
||||||
// const groupPlanUpgraded = {
|
|
||||||
// demographics: demographicsKey,
|
|
||||||
// name: upgradedGroupName,
|
|
||||||
// type: upgradedGroupType,
|
|
||||||
// };
|
|
||||||
// console.log(groupPlanUpgraded.demographics,
|
|
||||||
// groupPlanUpgraded.name, groupPlanUpgraded.type);
|
|
||||||
// return groupPlanUpgraded;
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.$root.$on('habitica:payment-success', data => {
|
this.$root.$on('habitica:payment-success', data => {
|
||||||
@@ -357,14 +342,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit () {
|
submit () {
|
||||||
if (!this.paymentData.newGroup) {
|
if (this.paymentData.group && !this.paymentData.newGroup) {
|
||||||
Analytics.track({
|
Analytics.track({
|
||||||
hitType: 'event',
|
hitType: 'event',
|
||||||
eventName: 'group plan upgrade',
|
eventName: 'group plan upgrade',
|
||||||
eventAction: 'group plan upgrade',
|
eventAction: 'group plan upgrade',
|
||||||
eventCategory: 'behavior',
|
eventCategory: 'behavior',
|
||||||
demographics: this.upgradedGroup.demographics,
|
demographics: this.upgradedGroup.demographics,
|
||||||
type: this.paymentData.group.type, // also tried this.upgradedGroup.type
|
type: this.paymentData.group.type,
|
||||||
}, { trackOnClient: true });
|
}, { trackOnClient: true });
|
||||||
}
|
}
|
||||||
this.paymentData = {};
|
this.paymentData = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user