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

🐛 Fixed plaintext field being added as empty property when member post is requested

no issue

- Tests in previous commit uncovered a bug with unwanted field attached to
the post response
This commit is contained in:
Nazar Gargol 2019-10-31 12:11:36 +01:00 committed by Naz Gargol
parent 6fa20066f5
commit 11d1acb475
2 changed files with 6 additions and 2 deletions

View file

@ -7,7 +7,9 @@ const forPost = (attrs, frame) => {
if (!memberHasAccess) {
['plaintext', 'html'].forEach((field) => {
attrs[field] = '';
if (attrs[field] !== undefined) {
attrs[field] = '';
}
});
}
}

View file

@ -7,7 +7,9 @@ const forPost = (attrs, frame) => {
if (!memberHasAccess) {
['plaintext', 'html'].forEach((field) => {
attrs[field] = '';
if (attrs[field] !== undefined) {
attrs[field] = '';
}
});
}
}