Fix JS test.

This commit is contained in:
Guo Xiang Tan 2016-11-18 10:43:39 +08:00
parent 12b175db59
commit 7af75bf3a4
1 changed files with 7 additions and 8 deletions

View File

@ -137,6 +137,13 @@ export default class Widget {
register.deprecateContainer(this);
this.key = this.buildKey ? this.buildKey(attrs) : null;
this.site = register.lookup('site:main');
this.siteSettings = register.lookup('site-settings:main');
this.currentUser = register.lookup('current-user:main');
this.capabilities = register.lookup('capabilities:main');
this.store = register.lookup('store:main');
this.appEvents = register.lookup('app-events:main');
this.keyValueStore = register.lookup('key-value-store:main');
// Helps debug widgets
if (Ember.testing) {
@ -148,14 +155,6 @@ export default class Widget {
}
}
this.site = register.lookup('site:main');
this.siteSettings = register.lookup('site-settings:main');
this.currentUser = register.lookup('current-user:main');
this.capabilities = register.lookup('capabilities:main');
this.store = register.lookup('store:main');
this.appEvents = register.lookup('app-events:main');
this.keyValueStore = register.lookup('key-value-store:main');
if (this.name) {
const custom = _customSettings[this.name];
if (custom) {