From 4927707450651e412f3d579db24646169d52b0c6 Mon Sep 17 00:00:00 2001 From: Kitteh Date: Tue, 25 May 2021 12:08:21 +0100 Subject: [PATCH] Make sure to clear the timer on TOTP view. --- src/pages/Secrets/TOTP/TOTPView.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/Secrets/TOTP/TOTPView.tsx b/src/pages/Secrets/TOTP/TOTPView.tsx index 822a6d1..0613dba 100644 --- a/src/pages/Secrets/TOTP/TOTPView.tsx +++ b/src/pages/Secrets/TOTP/TOTPView.tsx @@ -28,6 +28,10 @@ export class RefreshingTOTPGridItem extends Component< }); } + componentWillUnmount(): void { + clearInterval(this.timer as number); + } + componentDidMount(): void { this.updateTOTPCode(); this.timer = setInterval(() => {