Skip to content

Commit

Permalink
only tare when device is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevie-Ray committed Oct 18, 2024
1 parent 05ee694 commit b5f929f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/flappy-bird/src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function setupDevice(selectElement: HTMLSelectElement, outputElement: HTM

export function setupTare(element: HTMLDivElement) {
element.addEventListener("click", () => {
device.tare()
device?.tare()
})
}

Expand Down
2 changes: 1 addition & 1 deletion examples/pong/src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function setupDevice(selectElement: HTMLSelectElement, outputElement: HTM

export function setupTare(element: HTMLDivElement) {
element.addEventListener("click", () => {
device.tare()
device?.tare()
})
}

Expand Down

0 comments on commit b5f929f

Please sign in to comment.