mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 17:53:44 +08:00
DEV: Disable discourse-presence
in Ember test env.
This commit is contained in:
parent
2045f51312
commit
8b3b5d1474
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user