diff --git a/package.json b/package.json index fce9284..fd38eef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jukebot", - "version": "2.0.0", + "version": "2.0.1", "main": "build/index.js", "license": "MIT", "repository": "https://github.com/NachoToast/Jukebot.git", diff --git a/src/classes/Jukebox/Jukebox.ts b/src/classes/Jukebox/Jukebox.ts index 7f03609..6088b5c 100644 --- a/src/classes/Jukebox/Jukebox.ts +++ b/src/classes/Jukebox/Jukebox.ts @@ -169,7 +169,7 @@ export class Jukebox { this.prevInventory.addItems(this.inventory.shift()!); } - this.inventory[0].prepare(); + this.inventory[0]?.prepare(); this.events.emit(`stateChange`, this._status, newStatus); this._lastStatusChange = Date.now();