compound icon indicating copy to clipboard operation
compound copied to clipboard

Cannot call method 'T' of undefined

Open lovejaco opened this issue 13 years ago • 4 comments

my code [viewname].html <%= t('lanng.key') %> -- error messge : Cannot call method 'T' of undefined

controller-extenstions.js

Controller.prototype.t = function() { if (!this._t) { this._t = this.compound.T(); this._t.locale = this.app.settings.defaultLocale || 'en'; this._T = this.compound.T; } ... };

problem : this == controller (at invoke scope)

lovejaco avatar Dec 21 '12 16:12 lovejaco

What version of compound? I've already fixed it today.

anatoliychakkaev avatar Dec 21 '12 16:12 anatoliychakkaev

Thank you for your quick reply but it is newest version ([email protected])

lovejaco avatar Dec 21 '12 16:12 lovejaco

Fixed. But need to come up with better idea how to solve this problem. Keeping issue open to not forget about it.

anatoliychakkaev avatar Dec 21 '12 19:12 anatoliychakkaev

Proper fix found.

anatoliychakkaev avatar Dec 21 '12 20:12 anatoliychakkaev