add eslint + fix lint errors
This commit is contained in:
parent
e1a532500e
commit
e2898ee5bf
19 changed files with 938 additions and 92 deletions
|
|
@ -7,9 +7,7 @@ function useHighlighting({ view, pattern, active, getTime }) {
|
|||
useEffect(() => {
|
||||
if (view) {
|
||||
if (pattern && active) {
|
||||
let frame = requestAnimationFrame(updateHighlights);
|
||||
|
||||
function updateHighlights() {
|
||||
let frame = requestAnimationFrame(function updateHighlights() {
|
||||
try {
|
||||
const audioTime = getTime();
|
||||
// force min framerate of 10 fps => fixes crash on tab refocus, where lastEnd could be far away
|
||||
|
|
@ -25,8 +23,7 @@ function useHighlighting({ view, pattern, active, getTime }) {
|
|||
view.dispatch({ effects: setHighlights.of([]) });
|
||||
}
|
||||
frame = requestAnimationFrame(updateHighlights);
|
||||
}
|
||||
|
||||
});
|
||||
return () => {
|
||||
cancelAnimationFrame(frame);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue