From 64cd4243c54cd052971f4f060ff21fecb3d7f7a2 Mon Sep 17 00:00:00 2001 From: Sag Date: Wed, 6 Mar 2024 22:14:17 +0100 Subject: [PATCH] Fixed tiers paywall selecting all paid tiers (#19817) refs INC-36 - oversight in parent commit 00cff0a --- .../api/endpoints/utils/serializers/output/mappers/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js b/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js index 8e066799f024..6ab36cd8f089 100644 --- a/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js +++ b/ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/posts.js @@ -62,7 +62,7 @@ module.exports = async (model, frame, options = {}) => { jsonModel.tiers = tiersData || []; } - if (['tiers', 'paid'].includes(jsonModel.visibility) && jsonModel.tiers) { + if (jsonModel.visibility === 'paid' && jsonModel.tiers) { jsonModel.tiers = tiersData ? tiersData.filter(t => t.type === 'paid') : []; }