Skip to content

Commit

Permalink
fix(pinball): build errors in outside package
Browse files Browse the repository at this point in the history
Type information is not the same in the broadcast package environment
and is causing issues. These should resolve those errors in the outside
environment
  • Loading branch information
VodBox committed Mar 3, 2024
1 parent 66b412a commit ae3c72b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/channels/pinball/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Module = new Promise<MainModule>((res, rej) => {
});

export function loadPinball(dataUrl: URL) {
fetch(dataUrl, { method: 'HEAD' }).then((res) => {
fetch(dataUrl.toString(), { method: 'HEAD' }).then((res) => {
if (!res.ok) {
reject();
return;
Expand Down
3 changes: 2 additions & 1 deletion src/channels/pinball/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ keysRep.on('change', (newKeys) => {
});
});

window.addEventListener('pinballScore', (event) => {
window.addEventListener('pinballScore', (ev) => {
const event = ev as CustomEvent<{ score: number }>;
if (pinballHighScore.status === 'declaring') return;
if ((pinballHighScore.value ?? 0) < event.detail.score) pinballHighScore.value = event.detail.score;
});
Expand Down

0 comments on commit ae3c72b

Please sign in to comment.