Fix setTimeout losing this context by using arrow function
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -152,7 +152,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
|
|||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
this.isOneAccountJustCreate = true;
|
this.isOneAccountJustCreate = true;
|
||||||
this.justCreateUsername = userToCreate.username;
|
this.justCreateUsername = userToCreate.username;
|
||||||
setTimeout(this.resetJustCreateFlag, JUST_CREATE_ACCOUNT_HOT_DURATION_MINS * 1000 * 60);
|
setTimeout(() => this.resetJustCreateFlag(), JUST_CREATE_ACCOUNT_HOT_DURATION_MINS * 1000 * 60);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
apiError(error, 'Failed to add a new account.');
|
apiError(error, 'Failed to add a new account.');
|
||||||
|
|||||||
Reference in New Issue
Block a user