From 6a947e8879a3cfd93a497f33b6f47e3f65eeb548 Mon Sep 17 00:00:00 2001 From: johanrd Date: Tue, 6 Oct 2020 13:46:10 +0200 Subject: [PATCH] fix: Fixing bug where isBooted is set to true even if Intercom is prevented to boot from third party tracking blockers, e.g. "Disconnect" --- addon/services/intercom.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addon/services/intercom.js b/addon/services/intercom.js index 05efa5a2..0c8f6f35 100644 --- a/addon/services/intercom.js +++ b/addon/services/intercom.js @@ -141,13 +141,17 @@ export default Service.extend(Evented, { /** * Boot intercom window + * Set isBooted to true if Intercom is booted, and false if intercom is prevented to boot from third party tracking blockers, e.g. "Disconnect" + * * @param {Object} [config={}] [description] * @public */ boot(config = {}) { this._callIntercomMethod('boot', normalizeIntercomMetadata(config)); this._addEventHandlers(); - this.set('isBooted', true); + if (window.Intercom) { + this.set('isBooted', window.Intercom.booted) + } }, /**