mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-10 22:14:35 -04:00
BUGFIX: more robust breakUp helper
This commit is contained in:
parent
e5b4f0f51e
commit
5a238c62eb
1 changed files with 5 additions and 2 deletions
|
@ -7,9 +7,12 @@
|
|||
Handlebars.registerHelper('breakUp', function(property, hint, options) {
|
||||
var prop = Ember.Handlebars.get(this, property, options);
|
||||
if (!prop) return "";
|
||||
if (typeof(hint) !== 'string') hint = property;
|
||||
if (typeof(hint) === 'string') {
|
||||
hint = Ember.Handlebars.get(this, hint, options);
|
||||
} else {
|
||||
hint = undefined;
|
||||
}
|
||||
|
||||
hint = Ember.Handlebars.get(this, hint, options);
|
||||
return new Handlebars.SafeString(Discourse.Formatter.breakUp(prop, hint));
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue