Skip to content

Commit

Permalink
pendo-sdk/added debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam4415 committed Nov 26, 2020
1 parent 0c3b385 commit accccf8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion integrations/Pendo/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 --- */
Expand Down

0 comments on commit accccf8

Please sign in to comment.