mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 01:40:21 +03: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
@ -18,6 +18,10 @@ module.exports = function content(options) {
|
|||||||
truncateOptions[key] = parseInt(truncateOptions[key], 10);
|
truncateOptions[key] = parseInt(truncateOptions[key], 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.html === null) {
|
||||||
|
this.html = '';
|
||||||
|
}
|
||||||
|
|
||||||
if (truncateOptions.hasOwnProperty('words') || truncateOptions.hasOwnProperty('characters')) {
|
if (truncateOptions.hasOwnProperty('words') || truncateOptions.hasOwnProperty('characters')) {
|
||||||
return new SafeString(
|
return new SafeString(
|
||||||
downsize(this.html, truncateOptions)
|
downsize(this.html, truncateOptions)
|
||||||
|
Loading…
Reference in New Issue
Block a user