From 55bf312b874767e043bbbe8435a31ad17cd71d06 Mon Sep 17 00:00:00 2001 From: Greg Gutkin Date: Mon, 6 May 2019 10:44:29 -0700 Subject: [PATCH] Use proper method for unsetting Sentry user context on logout Current implementation causes an error popup on logout if Sentry is enabled. This is because `remove_user` is not a valid method on the `scope` object. Changing to use the `setUser` with a `null` parameter as discussed here - https://github.com/getsentry/sentry-docs/issues/500 --- src/util/log.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/log.js b/src/util/log.js index bf160df8..cf048cb8 100644 --- a/src/util/log.js +++ b/src/util/log.js @@ -43,7 +43,7 @@ export const setUserId = userId => { export const clearUserId = () => { Sentry.configureScope(scope => { - scope.remove_user(); + scope.setUser(null); }); };