Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
With Glimmer2, Ember.Helpers will receive their namedArgs as an Emp…
Browse files Browse the repository at this point in the history
…tyObject. This created a problem using `hasOwnProperty` in the service. Simple work around.
  • Loading branch information
Wesley Workman committed Aug 30, 2016
1 parent d602e51 commit 4a8f4a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/services/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export default Parent.extend(Evented, {
// Returns the translation `key` interpolated with `data`
// in the current `locale`.
t(key, data = {}) {
Ember.deprecate('locale is a reserved attribute', !data.hasOwnProperty('locale'), {
Ember.deprecate('locale is a reserved attribute', data['locale'] === undefined, {
id: 'ember-i18n.reserve-locale',
until: '5.0.0'
});

Ember.deprecate('htmlSafe is a reserved attribute', !data.hasOwnProperty('htmlSafe'), {
Ember.deprecate('htmlSafe is a reserved attribute', data['htmlSafe'] === undefined, {
id: 'ember-i18n.reserve-htmlSafe',
until: '5.0.0'
});
Expand Down

0 comments on commit 4a8f4a8

Please sign in to comment.