hotfix: fix auth persist

Switch lifecycle event to update
This commit is contained in:
sua yoo 2021-12-05 16:52:58 -08:00
parent 9c4bec1411
commit 5531c3c33c
No known key found for this signature in database
GPG Key ID: 5AD1B4C02D4F0567

View File

@ -24,9 +24,9 @@ export function needLogin<T extends { new (...args: any[]): LiteElement }>(
};
}
connectedCallback() {
update(changedProperties: Map<string, any>) {
if (this.authState) {
super.connectedCallback();
super.update(changedProperties);
} else {
this.dispatchEvent(new CustomEvent("need-login"));
}