From 7ad97024945c271ecadf9425c818c02143520cac Mon Sep 17 00:00:00 2001 From: John Tran Date: Tue, 13 Oct 2020 11:14:23 -0700 Subject: [PATCH 1/2] feat: make oninit public --- src/amplitude-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amplitude-client.js b/src/amplitude-client.js index 32089314..cf945fc5 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -492,7 +492,7 @@ AmplitudeClient.prototype.isNewSession = function isNewSession() { /** * Store callbacks to call after init - * @private + * @public */ AmplitudeClient.prototype.onInit = function (callback) { if (this._isInitialized) { From bd48c718a52aa2e44d3920b2f364ebb6d75b1fc1 Mon Sep 17 00:00:00 2001 From: John Tran Date: Tue, 13 Oct 2020 12:11:28 -0700 Subject: [PATCH 2/2] Update docs --- src/amplitude-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amplitude-client.js b/src/amplitude-client.js index cf945fc5..2f5563d8 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -491,7 +491,7 @@ AmplitudeClient.prototype.isNewSession = function isNewSession() { }; /** - * Store callbacks to call after init + * Add callbacks to call after init. Useful for users who load Amplitude through a snippet. * @public */ AmplitudeClient.prototype.onInit = function (callback) {