Skip to content
This repository was archived by the owner on Jan 31, 2019. It is now read-only.

Commit cc20dfc

Browse files
committed
destructure Ember.I18n each time render is called
Fixes using `ember-i18n`. Otherwise the workaround [described here](https://github.com/DockYard/ember-validations/issues/366#issuecomment-169869004) using `ember-i18n` does not work. When running multiple tests, ember-validations will use a destroyed version of `i18n` from the 1st test run.
1 parent 8e9b383 commit cc20dfc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

addon/messages.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import Ember from 'ember';
22

3-
const { I18n } = Ember;
4-
53
export default {
64
render(attribute, context) {
5+
const { I18n } = Ember;
76
if (I18n) {
87
return I18n.t(`errors.${attribute}`, context);
98
} else {

0 commit comments

Comments
 (0)