Skip to content

Commit 09506ca

Browse files
committed
Refactor code - load heavy getter once
1 parent 656b6c6 commit 09506ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/analytics-nextjs/src/Analytics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ export class Analytics {
205205
this.loadSegment();
206206
}
207207

208-
if (this.identity && this.permissions.canIdentify) {
209-
const { identity } = this;
208+
const { identity } = this;
209+
if (identity && this.permissions.canIdentify) {
210210
this.segment?.identify(
211211
identity.userId,
212212
{ ...identity.traits, prezly: this.meta },

0 commit comments

Comments
 (0)