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:
parent
a180d4e103
commit
01b03f7a1a
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue