Treat both-null entitlements as same scope in stripe-reuse matcher
This commit is contained in:
committed by
John Yeo
parent
b56239b3bb
commit
9f346dca06
@@ -77,6 +77,8 @@ export const getPriceStripeReuseLevel = ({
|
||||
entitlements: candidateEntitlements,
|
||||
});
|
||||
|
||||
// Both null = same (null) entity scope; both have ents = compare them.
|
||||
if (!newEnt && !candidateEnt) return "full";
|
||||
if (!newEnt || !candidateEnt) return "none";
|
||||
if (entsAreSame(candidateEnt, newEnt)) return "full";
|
||||
}
|
||||
@@ -98,6 +100,7 @@ export const getPriceStripeReuseLevel = ({
|
||||
entitlements: candidateEntitlements,
|
||||
});
|
||||
|
||||
if (!newEnt && !candidateEnt) return "stripeProductOnly";
|
||||
if (!newEnt || !candidateEnt) return "none";
|
||||
if (newEnt.entity_feature_id !== candidateEnt.entity_feature_id) {
|
||||
return "none";
|
||||
|
||||
Reference in New Issue
Block a user