0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 Fixed returning 'null' text for exerpt helper

refs #10554

- Fixes a flow described in https://github.com/TryGhost/Ghost/issues/10554#issuecomment-469127056
This commit is contained in:
Nazar Gargol 2019-03-04 14:39:20 +08:00
parent a180d4e103
commit 01b03f7a1a

View file

@ -21,7 +21,11 @@ var proxy = require('./proxy'),
*/
module.exports = function excerpt(options) {
var truncateOptions = (options || {}).hash || {},
excerptText = this.custom_excerpt ? String(this.custom_excerpt) : String(this.html);
excerptText = this.custom_excerpt
? String(this.custom_excerpt)
: this.html
? String(this.html)
: '';
truncateOptions = _.pick(truncateOptions, ['words', 'characters']);
_.keys(truncateOptions).map(function (key) {