Skip to content

Commit 474284d

Browse files
committed
Fixed a null reference exception when clearing the user identity.
1 parent 14f14e3 commit 474284d

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

dist/exceptionless.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EventBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class EventBuilder {
7373
public setUserIdentity(identity:string, name:string): EventBuilder;
7474
public setUserIdentity(userInfoOrIdentity:IUserInfo|string, name?:string): EventBuilder {
7575
var userInfo = typeof userInfoOrIdentity !== 'string' ? userInfoOrIdentity : { identity: userInfoOrIdentity, name: name };
76-
if (!userInfo.identity && !userInfo.name) {
76+
if (!userInfo || (!userInfo.identity && !userInfo.name)) {
7777
return this;
7878
}
7979

src/configuration/Configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export class Configuration implements IConfigurationSettings {
151151
public setUserIdentity(identity:string, name:string): void;
152152
public setUserIdentity(userInfoOrIdentity:IUserInfo|string, name?:string): void {
153153
var userInfo = typeof userInfoOrIdentity !== 'string' ? userInfoOrIdentity : { identity: userInfoOrIdentity, name: name };
154-
if (!userInfo.identity && !userInfo.name) {
154+
if (!userInfo || (!userInfo.identity && !userInfo.name)) {
155155
delete this.defaultData['@user'];
156156
} else {
157157
this.defaultData['@user'] = userInfo;

0 commit comments

Comments
 (0)