Skip to content

Commit b51b4c1

Browse files
committed
refactor: address review comments
1 parent f015422 commit b51b4c1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/analytics-js/src/components/userSessionManager/UserSessionManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,8 @@ class UserSessionManager implements IUserSessionManager {
767767

768768
batch(() => {
769769
Object.keys(DEFAULT_USER_SESSION_VALUES).forEach(key => {
770-
if (opts.entries[key as UserSessionKey] !== true) {
770+
const userSessionKey = key as UserSessionKey;
771+
if (opts.entries[userSessionKey] !== true) {
771772
return;
772773
}
773774

@@ -779,8 +780,7 @@ class UserSessionManager implements IUserSessionManager {
779780
this.resetAndStartNewSession();
780781
break;
781782
default:
782-
session[key as UserSessionKey].value =
783-
DEFAULT_USER_SESSION_VALUES[key as UserSessionKey];
783+
session[userSessionKey].value = DEFAULT_USER_SESSION_VALUES[userSessionKey];
784784
break;
785785
}
786786
});

0 commit comments

Comments
 (0)