From 36461b2334410bd797370fc8e043af15b06fb462 Mon Sep 17 00:00:00 2001 From: IceTank <61137113+IceTank@users.noreply.github.com> Date: Mon, 30 May 2022 23:18:03 +0200 Subject: [PATCH] Add missing null check (#269) --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index a058cab..dd1cd8c 100644 --- a/index.js +++ b/index.js @@ -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) }