DEV: Disable discourse-presence in Ember test env.

This commit is contained in:
Guo Xiang Tan 2020-04-29 13:39:02 +08:00
parent 2045f51312
commit 8b3b5d1474
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
2 changed files with 3 additions and 3 deletions

View File

@ -11,11 +11,11 @@ export default Component.extend({
@on("didInsertElement")
subscribe() {
this.get("presenceManager").subscribe();
this.presenceManager && this.presenceManager.subscribe();
},
@on("willDestroyElement")
_destroyed() {
this.get("presenceManager").unsubscribe();
this.presenceManager && this.presenceManager.unsubscribe();
}
});

View File

@ -35,7 +35,7 @@ export default {
initialize(container) {
const siteSettings = container.lookup("site-settings:main");
if (siteSettings.presence_enabled) {
if (siteSettings.presence_enabled && ENV.environment !== "test") {
withPluginApi("0.8.40", initializeDiscoursePresence);
}
}