Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DON-904 - tweak new My Account timeout #1373

Merged
merged 4 commits into from
Nov 4, 2023
Merged

DON-904 - tweak new My Account timeout #1373

merged 4 commits into from
Nov 4, 2023

Conversation

NoelLH
Copy link
Contributor

@NoelLH NoelLH commented Nov 2, 2023

Only allow setting it client-side, and clear
it when appropriate.

Also fix a typo in a similar bit of metacampaign
cleanup

Only allow setting it client-side, and clear
it when appropriate.

Also fix a typo in a similar bit of metacampaign
cleanup
@NoelLH NoelLH self-assigned this Nov 2, 2023
@@ -119,7 +119,7 @@ export class MetaCampaignComponent implements AfterViewChecked, OnDestroy, OnIni

ngOnDestroy() {
if (isPlatformBrowser(this.platformId) && this.tickerUpdateTimer) {
clearInterval(this.tickerUpdateTimer);
clearTimeout(this.tickerUpdateTimer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I see this was set by setTimeout not setInterval so I guess clearInterval was a mistake before.

public person: Person;

public paymentMethods: PaymentMethod[]|undefined = undefined;
registerErrorDescription: string | undefined;
registerSucessMessage: string | undefined;
protected readonly faExclamationTriangle = faExclamationTriangle;

private savedCardsTimer: ReturnType<typeof setTimeout>; // https://stackoverflow.com/a/56239226
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoying that the type is different in Node and browsers, but this looks like a good solution. And comment is definitely needed - thanks.

bdsl
bdsl previously approved these changes Nov 3, 2023
@NoelLH NoelLH merged commit 1e64a2d into develop Nov 4, 2023
3 checks passed
@NoelLH NoelLH deleted the DON-904-timer-tidy branch November 4, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants