We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e02c568 commit 388b790Copy full SHA for 388b790
packages/common/utils/analytics.js
@@ -51,8 +51,10 @@ export function resetUserId() {
51
debug('[Amplitude] Resetting User ID');
52
identify('userId', null);
53
54
- window.amplitude.getInstance().setUserId(null);
55
- window.amplitude.getInstance().regenerateDeviceId();
+ if (window.amplitude.getInstance().options.userId) {
+ window.amplitude.getInstance().setUserId(null);
56
+ window.amplitude.getInstance().regenerateDeviceId();
57
+ }
58
}
59
60
} catch (e) {
0 commit comments