diff --git a/integrations/Pendo/browser.js b/integrations/Pendo/browser.js index 01629e6c3f..01110308b5 100644 --- a/integrations/Pendo/browser.js +++ b/integrations/Pendo/browser.js @@ -37,7 +37,15 @@ class Pendo { })(window, document, "script", "pendo"); })(this.apiKey); logger.debug("===in init Pendo==="); - window.pendo.initialize(); + this.setIntervalHandler = setInterval(this.handleDebugger.bind(this), 1000); + } + + handleDebugger() { + if (window.pendo.isReady && window.pendo.isReady()) { + // eslint-disable-next-line no-unused-expressions + this.isDebugMode ? this.enableDebugging() : this.disableDebugging(); + clearInterval(this.setIntervalHandler); + } } /* utility functions ---Start here --- */