Skip to content

Commit

Permalink
fix(@aws-amplify/ui-components): use correct unmount lifecycle for au…
Browse files Browse the repository at this point in the history
…thenticator (#8227)
  • Loading branch information
hkjpotato authored May 5, 2021
1 parent dedd564 commit 9314112
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class AmplifyAuthenticator {
return <slot name={slotName}>{slotIsEmpty && authComponent}</slot>;
}

componentWillUnload() {
disconnectedCallback() {
Hub.remove(AUTH_CHANNEL, this.handleExternalAuthEvent);
if (!this.hideToast) Hub.remove(UI_AUTH_CHANNEL, this.handleToastEvent);
return onAuthUIStateChange;
Expand Down

0 comments on commit 9314112

Please sign in to comment.