From 2cf4f8ee1e862c16ab70e075172b5f4486537a80 Mon Sep 17 00:00:00 2001 From: Neko-rai <83566739+Neko-rai@users.noreply.github.com> Date: Mon, 3 May 2021 00:12:08 -0400 Subject: [PATCH] fix an error in use torch You should return if the system is not 'dnd5e' before validating other params this provoke an error in other system. Nice module ;) --- torch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torch.js b/torch.js index b15a13e..a82e69f 100644 --- a/torch.js +++ b/torch.js @@ -109,11 +109,11 @@ class Torch { */ async function useTorch() { let torch = -1; - - if (data.isGM && !game.settings.get("torch", "gmUsesInventory")) - return; + if (game.system.id !== 'dnd5e') return; + if (data.isGM && !game.settings.get("torch", "gmUsesInventory")) + return; let actor = game.actors.get(data.actorId); if (actor === undefined) return;