fix: Fixed NPE issue with analytics event on authentication method configuration (#17112)

This commit is contained in:
Vishnu Gp 2022-09-29 00:33:54 +05:30 committed by GitHub
parent c84fdd6d96
commit 4b4b2f97d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -381,7 +381,7 @@ public class EnvManagerCEImpl implements EnvManagerCE {
*/
public void setAnalyticsEventAction(Map<String, Object> properties, String newVariable, String originalVariable, String authEnv) {
// Authentication configuration added
if (!newVariable.isEmpty() && originalVariable.isEmpty()) {
if (!newVariable.isEmpty() && (originalVariable == null || originalVariable.isEmpty())) {
properties.put("action", "Added");
}
// Authentication configuration removed