Skip to content

Commit

Permalink
fix of group traits after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
prabrishac committed Jul 27, 2020
1 parent 46f6918 commit 20d4f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ class Analytics {
if (!this.loaded) return;
this.userId = "";
this.userTraits = {};
this.groupId = "";
this.groupTraits = {};
this.storage.clear();
}

Expand Down
2 changes: 2 additions & 0 deletions utils/storage/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ class Storage {
clear() {
this.storage.remove(defaults.user_storage_key);
this.storage.remove(defaults.user_storage_trait);
this.storage.remove(defaults.group_storage_key);
this.storage.remove(defaults.group_storage_trait);
// this.storage.remove(defaults.user_storage_anonymousId);
}
}
Expand Down

0 comments on commit 20d4f70

Please sign in to comment.