Skip to content

Commit

Permalink
refactor: avoid temporary previous tapping declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
acid-chicken authored Apr 9, 2023
1 parent ce8967e commit e649b1b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/frontend/src/components/MkAnalogClock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,7 @@ let sOneRound = false;
function tick() {
const now = props.now();
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + props.offset);
const previousS = s;
const previousM = m;
const previousH = h;
s = now.getSeconds();
m = now.getMinutes();
h = now.getHours();
if (previousS === s && previousM === m && previousH === h) {
if (s === (s = now.getSeconds()) && m === (m = now.getMinutes()) && h === (h = now.getHours())) {
return;
}
hAngle = Math.PI * (h % (props.twentyfour ? 24 : 12) + (m + s / 60) / 60) / (props.twentyfour ? 12 : 6);
Expand Down

0 comments on commit e649b1b

Please sign in to comment.