Skip to content

Commit

Permalink
v6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Oct 15, 2021
1 parent fdbff3a commit 51244c4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Gleap = window.Gleap;

Gleap.setApiUrl("http://0.0.0.0:9000");
// Gleap.setApiUrl("http://0.0.0.0:9000");

Gleap.identify("123", {
name: "XOXO",
Expand Down
2 changes: 1 addition & 1 deletion published/6.0.0/index.js

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions src/Gleap.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ class Gleap {
*/
static initialize(sdkKey, gleapId, gleapHash) {
const instance = this.getInstance();
if (instance.initialized) {
console.warn("Gleap already initialized.");
return;
}
instance.initialized = true;

// Set default session (i.e. from the app SDK).
if (gleapId && gleapHash) {
Expand All @@ -131,12 +136,6 @@ class Gleap {
} catch (exp) {}
}

if (instance.initialized) {
console.warn("Gleap already initialized.");
return;
}
instance.initialized = true;

const sessionInstance = Session.getInstance();
sessionInstance.sdkKey = sdkKey;
sessionInstance.startSession();
Expand Down Expand Up @@ -170,7 +169,7 @@ class Gleap {
/**
* Clears the current user session
*/
static logout() {
static clearIdentity() {
Session.getInstance().clearSession();
}

Expand Down

0 comments on commit 51244c4

Please sign in to comment.