Skip to content

Commit a614efd

Browse files
committed
fix: alphatab event registration hook
1 parent eb27161 commit a614efd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/components/AlphaTabPlayground/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ export const AlphaTabPlayground: React.FC = () => {
142142
if (!api) {
143143
return;
144144
}
145-
146145
api.pause();
147146
switch (mediaType.type) {
148147
case MediaType.Synth:
@@ -202,7 +201,7 @@ export const AlphaTabPlayground: React.FC = () => {
202201

203202
break;
204203
}
205-
}, [api, mediaType]);
204+
}, [api, mediaType.type]);
206205

207206
return (
208207
<>

src/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function useAlphaTabEvent<
5757
api[event].off(handler as any);
5858
};
5959
}
60-
}, [api, event, handler, ...(deps ?? [])]);
60+
}, [api, event, ...(deps ?? [])]);
6161
}
6262

6363
export const useIsMount = () => {

0 commit comments

Comments
 (0)