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:
parent
608718ff26
commit
9a21bea2c7
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue