Skip to content

Commit

Permalink
runfix: Validate custom event (#2405)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode authored Mar 28, 2019
1 parent 2bcd0c6 commit e132319
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion electron/src/sso/AutomatedSingleSignOn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ class AutomatedSingleSignOn {
public async start(ssoCode: string) {
window.addEventListener(
EVENT_TYPE.ACTION.CREATE_SSO_ACCOUNT_RESPONSE,
event => this.onResponseReceived(event as CustomEvent),
(event: Event) => {
if ((event as CustomEvent).detail) {
this.onResponseReceived(event as CustomEvent);
}
},
{
once: true,
}
Expand Down

0 comments on commit e132319

Please sign in to comment.