Skip to content

Commit

Permalink
Fix bug of being able to access slots outside of the 1-9 range (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
PondWader authored Nov 7, 2021
1 parent 180e124 commit ead3527
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ async function connect (options) {
}
if (e.code.startsWith('Digit')) {
const numPressed = e.code.substr(5)
if (numPressed < 1 || numPressed > 9) return
hotbar.reloadHotbarSelected(numPressed - 1)
}
if (e.code === 'KeyQ') {
Expand Down

0 comments on commit ead3527

Please sign in to comment.