hotfix: fix auth persist
Switch lifecycle event to update
This commit is contained in:
parent
9c4bec1411
commit
5531c3c33c
@ -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"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user