diff --git a/src/views/GiftedDetails.vue b/src/views/GiftedDetails.vue index fc82db4cd..6f6c37460 100644 --- a/src/views/GiftedDetails.vue +++ b/src/views/GiftedDetails.vue @@ -249,9 +249,10 @@ export default class GiftedDetails extends Vue { ); } + const prevAmount = this.prevCredToEdit?.claim?.object?.amountOfThisGood; this.amountInput = (this.$route as Router).query["amountInput"] || - String(this.prevCredToEdit?.claim?.object?.amountOfThisGood) || + (prevAmount ? String(prevAmount) : "") || this.amountInput; this.description = (this.$route as Router).query["description"] || @@ -275,13 +276,13 @@ export default class GiftedDetails extends Vue { : fulfills ? [fulfills] : []; - const offer = fulfillsArray.find((rec) => rec.claimType === "Offer"); + const offer = fulfillsArray.find((rec) => rec["@type"] === "Offer"); this.offerId = ((this.$route as Router).query["offerId"] || offer?.identifier || this.offerId) as string; // find any project ID - const project = fulfillsArray.find((rec) => rec.claimType === "PlanAction"); + const project = fulfillsArray.find((rec) => rec["@type"] === "PlanAction"); this.projectId = ((this.$route as Router).query["projectId"] || project?.identifier || this.projectId) as string;