2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Fixed reading_time calculation for non public posts

no issue

- The calculation of reading time has to happen before html field is sanitized for members plan.
This commit is contained in:
Nazar Gargol 2019-10-21 11:31:07 +02:00 committed by Fabien O'Carroll
parent 95543b0461
commit 5760395e92

View file

@ -35,6 +35,8 @@ const mapPost = (model, frame) => {
url.forPost(model.id, jsonModel, frame);
extraAttrs.forPost(frame, model, jsonModel);
if (utils.isContentAPI(frame)) {
// Content api v2 still expects page prop
if (jsonModel.type === 'page') {
@ -44,7 +46,6 @@ const mapPost = (model, frame) => {
members.forPost(jsonModel, frame);
}
extraAttrs.forPost(frame, model, jsonModel);
clean.post(jsonModel, frame);
if (frame.options && frame.options.withRelated) {