Skip to content

Commit

Permalink
Add missing null check (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTank authored May 30, 2022
1 parent cf9b9d3 commit 36461b2
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 @@ -330,6 +330,7 @@ function inject (bot) {
}

bot.on('blockUpdate', (oldBlock, newBlock) => {
if (!oldBlock) return
if (isPositionNearPath(oldBlock.position, path) && oldBlock.type !== newBlock.type) {
resetPath('block_updated', false)
}
Expand Down

0 comments on commit 36461b2

Please sign in to comment.