Skip to content

Commit

Permalink
Use requestAnimationFrame() instead of setTimeout()
Browse files Browse the repository at this point in the history
  • Loading branch information
bartblast committed Jan 20, 2025
1 parent 45775ac commit 958fc16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/hologram.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ export default class Hologram {

Hologram.executeAction(nextAction);
} else {
// TODO: remove when there is a proper client-side bitstring implementation in place
setTimeout(() => Hologram.render(), 0);
// TODO: consider: remove when there is a proper client-side bitstring implementation in place
window.requestAnimationFrame(() => Hologram.render());
}

if (!Type.isNil(nextPage)) {
Expand Down

0 comments on commit 958fc16

Please sign in to comment.