mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:23:39 +08:00
refactors context binding from _this to self
This commit is contained in:
parent
20f06f3efc
commit
e27f944ed1
|
@ -26,10 +26,10 @@ I18n.toHumanSize = function(number, options) {
|
|||
Ember.Handlebars.registerHelper('i18n', function(property, options) {
|
||||
// Resolve any properties
|
||||
var params,
|
||||
_this = this;
|
||||
self = this;
|
||||
params = options.hash;
|
||||
_.each(params, function(value, key) {
|
||||
params[key] = Em.Handlebars.get(_this, value, options);
|
||||
params[key] = Em.Handlebars.get(self, value, options);
|
||||
});
|
||||
return I18n.t(property, params);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user