We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7b39c8 commit f8316baCopy full SHA for f8316ba
packages/common/src/utils/analytics/amplitude.ts
@@ -44,7 +44,10 @@ export const resetUserId = () => {
44
debug('[Amplitude] Resetting User ID');
45
identify('userId', null);
46
47
- if (global.amplitude.getInstance().options.userId) {
+ if (
48
+ global.amplitude.getInstance().options &&
49
+ global.amplitude.getInstance().options.userId
50
+ ) {
51
global.amplitude.getInstance().setUserId(null);
52
global.amplitude.getInstance().regenerateDeviceId();
53
}
0 commit comments