0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

🐛 Fixed null displayed on empty post content (#10617)

refs #10612

- Added `null` value handling to {{content}} helper, which is same to how {{exerpt}} helper handles `null` values at the moment
This commit is contained in:
Eol 2019-03-18 12:46:59 +01:00 committed by Naz Gargol
parent 608718ff26
commit 9a21bea2c7

View file

@ -18,6 +18,10 @@ module.exports = function content(options) {
truncateOptions[key] = parseInt(truncateOptions[key], 10);
});
if (this.html === null) {
this.html = '';
}
if (truncateOptions.hasOwnProperty('words') || truncateOptions.hasOwnProperty('characters')) {
return new SafeString(
downsize(this.html, truncateOptions)