|
@ -604,19 +604,19 @@ export function hydrateGive( |
|
|
} |
|
|
} |
|
|
// ... and replace or add each element, ending with Trade or Donate
|
|
|
// ... and replace or add each element, ending with Trade or Donate
|
|
|
// I realize this doesn't change any elements that are not PlanAction or Offer or Trade/Action.
|
|
|
// I realize this doesn't change any elements that are not PlanAction or Offer or Trade/Action.
|
|
|
if (fulfillsProjectHandleId) { |
|
|
|
|
|
vcClaim.fulfills = vcClaim.fulfills.filter( |
|
|
vcClaim.fulfills = vcClaim.fulfills.filter( |
|
|
(elem) => elem["@type"] !== "PlanAction", |
|
|
(elem) => elem["@type"] !== "PlanAction", |
|
|
); |
|
|
); |
|
|
|
|
|
if (fulfillsProjectHandleId) { |
|
|
vcClaim.fulfills.push({ |
|
|
vcClaim.fulfills.push({ |
|
|
"@type": "PlanAction", |
|
|
"@type": "PlanAction", |
|
|
identifier: fulfillsProjectHandleId, |
|
|
identifier: fulfillsProjectHandleId, |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
if (fulfillsOfferHandleId) { |
|
|
|
|
|
vcClaim.fulfills = vcClaim.fulfills.filter( |
|
|
vcClaim.fulfills = vcClaim.fulfills.filter( |
|
|
(elem) => elem["@type"] !== "Offer", |
|
|
(elem) => elem["@type"] !== "Offer", |
|
|
); |
|
|
); |
|
|
|
|
|
if (fulfillsOfferHandleId) { |
|
|
vcClaim.fulfills.push({ |
|
|
vcClaim.fulfills.push({ |
|
|
"@type": "Offer", |
|
|
"@type": "Offer", |
|
|
identifier: fulfillsOfferHandleId, |
|
|
identifier: fulfillsOfferHandleId, |
|
|