mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
FIX: Helpers with multiple parameters were broken in 1.13
This commit is contained in:
@ -5,7 +5,7 @@ export function htmlHelper(fn) {
|
|||||||
if (Ember.Helper) {
|
if (Ember.Helper) {
|
||||||
return Ember.Helper.helper(function(...args) {
|
return Ember.Helper.helper(function(...args) {
|
||||||
if (args.length > 1) {
|
if (args.length > 1) {
|
||||||
args[1] = { hash: args[1] };
|
args = args[0].concat(args[args.length-1]);
|
||||||
}
|
}
|
||||||
return new Handlebars.SafeString(fn.apply(this, args) || '');
|
return new Handlebars.SafeString(fn.apply(this, args) || '');
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user