From 355f8b9c9d4696623ea930002309b4f011247f26 Mon Sep 17 00:00:00 2001 From: olfek <27283110+olfek@users.noreply.github.com> Date: Mon, 21 Oct 2024 01:50:58 +0100 Subject: [PATCH] verbose is king Co-authored-by: Brendan Early --- src/store/Accounts.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/store/Accounts.ts b/src/store/Accounts.ts index b7907b13..63f177aa 100644 --- a/src/store/Accounts.ts +++ b/src/store/Accounts.ts @@ -89,8 +89,12 @@ export class Accounts implements Module { second += Number(UserSettings.items.offset); } - // prevent second from negative - second = (second < 0) ? (60 - (second * -1) % 60) : (second % 60); + if (second < 0) { + // Handle the situation where offset causes `second` to be negative. #1310 + second = 60 - ((second * -1) % 60) + } else { + second = second % 60 + } state.second = second; let currentlyEncrypted = false;